Re: Determining when a row was inserted - Mailing list pgsql-general

From Wiebe de Jong
Subject Re: Determining when a row was inserted
Date
Msg-id 0IHI00E3RSCLQI@l-daemon
Whole thread Raw
In response to Re: Determining when a row was inserted  (Terry Lee Tucker <terry@esc1.com>)
Responses Re: Determining when a row was inserted
Re: Determining when a row was inserted
List pgsql-general
The way I do it is to add a timestamp field with a default value of now().
Unfortunately, this won't help with any records that have already been
created.

Wiebe

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Terry Lee Tucker
Sent: Thursday, June 02, 2005 5:51 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Determining when a row was inserted

I don't think there is a way to do that. You'll have to create an audit
table
and a rule to update it or you'll have to add a column to the table and a
trigger to update it.

On Thursday 02 June 2005 01:22 am, Eisenhut, Glenn saith:
> Folks - hi
>
> Is it possible to determine when a row was inserted into a table using the
> system catalogs or such. I have the situation where I need to find out
when
> a user was added to a user table - the table was not setup with a date to
> track this.
>
> Thanks
> Glenn

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


pgsql-general by date:

Previous
From: Peter Fein
Date:
Subject: Re: Test for array slice?
Next
From: Alex Turner
Date:
Subject: Re: Determining when a row was inserted