Re: Date manipulation - Mailing list pgsql-general

From Harald Fuchs
Subject Re: Date manipulation
Date
Msg-id pubrlocil7.fsf@srv.protecting.net
Whole thread Raw
In response to Date manipulation  (Hadley Willan <hadley.willan@deeperdesign.co.nz>)
List pgsql-general
In article <1082322155.6031.3.camel@atlas.sol.deeper.co.nz>,
Hadley Willan <hadley.willan@deeperdesign.co.nz> writes:

> 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.

Are you absolutely sure you want to do that?  This would prune old
log entries on every insert.  Why not trimming via crontab?

pgsql-general by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: plan-reading extensive tutorial?
Next
From: javier garcia - CEBAS
Date:
Subject: doubt about pg_dumpall