Re: Date manipulation

From: Harald Fuchs <hf320(at)protecting(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Date manipulation
Date: 2004-04-19 11:28:36
Message-ID: pubrlocil7.fsf@srv.protecting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In article <1082322155(dot)6031(dot)3(dot)camel(at)atlas(dot)sol(dot)deeper(dot)co(dot)nz>,
Hadley Willan <hadley(dot)willan(at)deeperdesign(dot)co(dot)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?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message javier garcia - CEBAS 2004-04-19 15:20:40 doubt about pg_dumpall
Previous Message Shridhar Daithankar 2004-04-19 08:39:21 Re: plan-reading extensive tutorial?