Internal time stamps?
Internal time stamps?
От:
Aaron <niccoli00@yahoo.com>
Дата:
Does postgresql have any kind of internal time stamps for a table entry? I can create a field that is 'timestamp' and store it there, I was just wondering if it was already done internally. I'd hate to duplicate something it already does. :-)
If it does store it internally, how do you access it?
Thanks!!
Aaron
Re: Internal time stamps?
От:
APseudoUtopia <apseudoutopia@gmail.com>
Дата:
On Tue, Nov 24, 2009 at 1:26 PM, Aaron wrote: > Does postgresql have any kind of internal time stamps for a table entry? I > can create a field that is 'timestamp' and store it there, I was just > wondering if it was already done internally. I'd hate to duplicate > something it already does. :-) > If it does store it internally, how do you access it? > Thanks!! > Aaron To the best of my knowledge: Internal timestamps do not exist. If you want to store a timestamp of when a row was inserted, just use a TIMESTAMP type column (with- or without- time zone; WITH TIME ZONE is recommended) and insert CURRENT_TIMESTAMP or NOW or whatever function you wanna use.