Search Postgresql Archives

Re: Date manipulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux