Re: Column Specific Update Trigger Routine

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Column Specific Update Trigger Routine
Дата
Msg-id 24219.1273180420@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Column Specific Update Trigger Routine  ("Plugge, Joe R." <JRPlugge@west.com>)
Список pgsql-sql
"Plugge, Joe R." <JRPlugge@west.com> writes:
> This is what I have and it seems to work:

>             IF OLD.password != NEW.password

It'd be better to write "IF OLD.password IS DISTINCT FROM NEW.password".
The way with != will not do what you want if one value is null and the
other isn't.  It's possible this doesn't matter in this particular case
(if password can't ever be null in this table), but being careful about
nulls is a good habit to cultivate.
        regards, tom lane


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

Предыдущее
От: "Plugge, Joe R."
Дата:
Сообщение: Re: Column Specific Update Trigger Routine
Следующее
От: Nicholas I
Дата:
Сообщение: help