Re: timestamps - Mailing list pgsql-general

From Doug McNaught
Subject Re: timestamps
Date
Msg-id 878yfgc7st.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to timestamps  (Tom Allison <tallison@tacocat.net>)
Responses Re: timestamps
List pgsql-general
Tom Allison <tallison@tacocat.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

pgsql-general by date:

Previous
From: Tom Allison
Date:
Subject: timestamps
Next
From: Larry Rosenman
Date:
Subject: Re: timestamps