On Fri, Apr 21, 2006 at 09:43:55AM -0500, Jeff Amiel wrote: > PostgreSQL 8.1.2 on i386-portbld-freebsd6.0, compiled by GCC cc (GCC) > 3.4.4 [FreeBSD] 20050518 > > We have triggers on each of our tables that create audit table entries > on each insert/update/delete. > The audit table (in addition to containing information about the change > that was made) contains a timestamp field and a serial as the primary key. > The timestamp is generated by calling now() inside the audit trigger, so > should contain the timestamp of when the transaction (that yielded the > insert/update/delete) began. now() returns the same time throughout the transaction i.e. the transaction start time. If you want a time independant of transaction status, perhaps you want timeofday(). Check the docs for the specifics. Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Attachment:
signature.asc
Description: Digital signature