Re: BEFORE UPDATE trigger doesn't change column value

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BEFORE UPDATE trigger doesn't change column value
Дата
Msg-id 1365259743.76123.YahooMailNeo@web162903.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: BEFORE UPDATE trigger doesn't change column value  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: BEFORE UPDATE trigger doesn't change column value
Список pgsql-general
Kevin Grittner <kgrittn@ymail.com> wrote:

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

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.

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: brad st
Дата:
Сообщение: Source code and database object identifiers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Source code and database object identifiers