Date manipulation

From: Hadley Willan <hadley(dot)willan(at)deeperdesign(dot)co(dot)nz>
To: PGSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Date manipulation
Date: 2004-04-18 21:02:35
Message-ID: 1082322155.6031.3.camel@atlas.sol.deeper.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I want to write a function in pgsql that given a number like 7 turns
that into a date, 7 weeks in the past. I have a table that is
essentially logging some information and want to write a trigger that is
data driven in trimming old values out of the log, that way if I thought
that 4 weeks was sufficient, I could adjust the value.

I've had a quick look around the docs and they're fairly spartan on
details like this.

Can anybody point me to an online reference for pgsql overall and
something that talks about the pitfalls and gives code examples of this
kind of thing?

Regards.
Hadley

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2004-04-18 22:36:55 Re: Date manipulation
Previous Message Jerry LeVan 2004-04-18 20:22:51 Re: Folding subtotals into query?