determining the age of a row in postgresql?

Bill Campbell linux-sxs
Thu Jun 7 13:51:55 PDT 2007


On Thu, Jun 07, 2007, Net Llama! wrote:
>I'm pulling my hair out trying to find a means of determining the age of a 
>row in a table in a PostgreSQL database.  I've googled, and found close to 
>nothing that doesn't require writing crazy triggers or altering the DB 
>schema.  Surely this must be possible, right?

I think one would need to have a time stamp column in the row for
comparison purposes, particularly if one is to be database agnostic.

One could have stored procedure(s) and triggers that updated this time when
a row is created or changed.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

No man's life, liberty, or property are safe while the legislature is in
session. -- Mark Twain



More information about the Linux-users mailing list