Skip site navigation (1) Skip section navigation (2)

Re: timestamps

From: Tom Allison <tallison(at)tacocat(dot)net>
To: Doug McNaught <doug(at)mcnaught(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamps
Date: 2004-05-26 01:31:11
Message-ID: 40B3F35F.5060006@tacocat.net (view raw or flat)
Thread:
Lists: pgsql-general
Doug McNaught wrote:
> 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
> 

Thanks for the pointer.  That should be enough.


In response to

pgsql-general by date

Next:From: Wei ShiDate: 2004-05-26 01:46:03
Subject: Re: About table schema
Previous:From: Larry RosenmanDate: 2004-05-26 01:14:30
Subject: Re: timestamps

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group