Re: How to find out that a record has been updated

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to find out that a record has been updated
Дата
Msg-id 20665.1002308914@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to find out that a record has been updated  ("P.V. Subramanian" <pvsmian@hotmail.com>)
Список pgsql-novice
"P.V. Subramanian" <pvsmian@hotmail.com> writes:
> If some records have been updated or added, the app does some work, and
> marks the record as processed.

> Currently anyone updating a record is expected to mark it manually as
> needing processing. Otherwise the application doesn't know.

> Is there a better, more user friendly way, for the app to automatically find
> out which records have been updated.

You don't need to change the table definition; just add an ON UPDATE
trigger that forces the marking column to be updated.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: "P.V. Subramanian"
Дата:
Сообщение: Why has the trigger been launched
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: The mystery of concurrent access