declare column update expression

From: "Chris Velevitch" <chris(dot)velevitch(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: declare column update expression
Date: 2008-09-11 07:35:34
Message-ID: b0a3bf780809110035x1d63a6bcs6bcfc79af7a07e4e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In 7.4, how do I declare that a column in a table is to be
automatically set to the value of some fixed expression whenever a row
is updated?

Eg column last_modified is always set to current_timestamp

Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au

Adobe Platform Users Group, Sydney
September meeting: It's Going To Be Brilliant
Date: Mon 29th September 6pm for 6:30 start
Details and RSVP on http://apugs2008september.eventbrite.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dean Rasheed 2008-09-11 07:57:16 Re: No error when column doesn't exist
Previous Message Dave Page 2008-09-11 07:29:56 Re: postgres user account on OSX