best way to auto-update a field when row is updated - Mailing list pgsql-sql

From Henry Ortega
Subject best way to auto-update a field when row is updated
Date
Msg-id 2bffcc3305031012092fde7dc2@mail.gmail.com
Whole thread Raw
Responses Re: best way to auto-update a field when row is updated  (Larry Rosenman <ler@lerctr.org>)
Re: best way to auto-update a field when row is updated  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-sql
I have the following table

FIELD_A        |          FIELD_B          |           TSTAMP
--------------------------------------------------------------------------------------------------------
x                              y                          2005-03-10
14:56:47.456431

TSTAMP = not null default now()

What's the best way to always auto-update TSTAMP to it's
default value whenever the row gets updated?
(e.g. update TABLENAME set FIELD_A='zzz' where FIELD_A='x';
should automatically set TSTAMP to now)


pgsql-sql by date:

Previous
From: "ALÝ ÇELÝK"
Date:
Subject: Re: interval +variable
Next
From: Larry Rosenman
Date:
Subject: Re: best way to auto-update a field when row is updated