Re: timestamps

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Tom Allison <tallison(at)tacocat(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamps
Date: 2004-05-26 01:10:26
Message-ID: 878yfgc7st.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Allison <tallison(at)tacocat(dot)net> writes:

> How would I specify a field that's to be updated to current_time
> everytime the row is created/altered?

Create a trigger. There are some good examples in the PL/pgSQL docs.

> Is there some way to put this 'update' property into the table instead
> of running some query to do it?

Triggers are the way to go in Postgres.

-Doug

In response to

  • timestamps at 2004-05-26 00:52:22 from Tom Allison

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Larry Rosenman 2004-05-26 01:14:30 Re: timestamps
Previous Message Tom Allison 2004-05-26 00:52:22 timestamps