best way to auto-update a field when row is updated

Поиск
Список
Период
Сортировка
От Henry Ortega
Тема best way to auto-update a field when row is updated
Дата
Msg-id 2bffcc3305031012092fde7dc2@mail.gmail.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: "ALÝ ÇELÝK"
Дата:
Сообщение: Re: interval +variable
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: best way to auto-update a field when row is updated