Re: Detecting changes to certain fields in 'before update' trigger functions

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: Detecting changes to certain fields in 'before update' trigger functions
Дата
Msg-id 396486430812010803t490255ddr3bd6f42a1e3c0f84@mail.gmail.com
обсуждение исходный текст
Ответ на Detecting changes to certain fields in 'before update' trigger functions  (Sebastian Tennant <sebyte@smolny.plus.com>)
Список pgsql-general
On Mon, Dec 1, 2008 at 7:18 AM, Sebastian Tennant
<sebyte@smolny.plus.com> wrote:

>  IF (NEW.<column-name> != OLD.<column-name>) THEN ...

 The != operator doesn't work the way you might think when nulls are
thrown into the mix.  I asked a similar question a while back and was
kindly pointed to the following syntax:

IF( NEW.* IS DISTINCT FROM OLD.* ) THEN ...


--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Detecting changes to certain fields in 'before update' trigger functions
Следующее
От: Daniel Chiaramello
Дата:
Сообщение: [TSearch2] Chinese dictionary?