Re: newbie: update timestamp trigger?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: ahnf <interz12(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: newbie: update timestamp trigger?
Date: 2007-10-23 19:43:31
Message-ID: dcc563d10710231243q1d69e8cau51bcf97d5f478025@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/23/07, ahnf <interz12(at)yahoo(dot)com> wrote:
> Whenever a row is updated in a table with a timestamp column. How do I write a trigger to set that timestamp column to now() or the current timestamp?

You should be able to take a virtual chainsaw to the example on this
page and do it:

http://www.postgresql.org/docs/8.2/static/plpgsql-trigger.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Hunter 2007-10-23 20:43:04 data statistic functions
Previous Message Rodrigo De León 2007-10-23 19:41:42 Re: newbie: update timestamp trigger?