Search Postgresql Archives

Re: timestamps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Doug McNaught wrote:
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


Thanks for the pointer. That should be enough.



---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux