Re: BEFORE UPDATE trigger doesn't change column value

Поиск
Список
Период
Сортировка
От Clemens Eisserer
Тема Re: BEFORE UPDATE trigger doesn't change column value
Дата
Msg-id CAFvQSYSNpjtsM1X3MBt2-DSBH07aw=Mut0ZdSumBnrE-Xea5Bw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BEFORE UPDATE trigger doesn't change column value  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-general
Hi Kevin,

Sorry, that's the wrong way around.  I should have said:

Your BEFORE UPDATE trigger could leave the "synced" value in NEW
alone if force_sync was **true**, and set "synced" to false
otherwise.  It could then set NEW.force_sync to false, to leave you
ready for the next update.

Thanks for your advice (and the patience on this list in general).
Instead of using two columns, I now use an integer-column and set it to a value taken from an incrementing sequence.

Thanks again, Clemens

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: procedure to contribute this community
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Hosting PG on AWS in 2013