Re: Problems with Triggers

Поиск
Список
Период
Сортировка
От Martin Marques
Тема Re: Problems with Triggers
Дата
Msg-id 200404151158.27690.martin@bugs.unl.edu.ar
обсуждение исходный текст
Ответ на Problems with Triggers  (Sebastian Böck <sebastianboeck@freenet.de>)
Ответы Re: Problems with Triggers  (Sebastian Böck <sebastianboeck@freenet.de>)
Список pgsql-general
El Jue 15 Abr 2004 08:55, Sebastian Böck escribió:
> Hello,
>
> is there a simple operator to determine whether the OLD.value and
> NEW.value are different. The <> operator is not working on NULL's.
>
> I need something like this:
> NEW.val <> Old.val OR
> NEW.val IS NULL AND OLD.val IS NOT NULL OR
> NEW.val IS NOT NULL AND OLD.val IS NULL

(NEW.val <> Old.val) OR
(NEW.val IS NULL AND OLD.val IS NOT NULL) OR
(NEW.val IS NOT NULL AND OLD.val IS NULL)

You forgot the parenthesis, to group the conditions accordingly

--
 11:56:01 up 37 days, 16:23,  2 users,  load average: 1.86, 0.99, 0.72
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador
             Universidad Nacional
                  del Litoral
-----------------------------------------------------------------


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

Предыдущее
От: "Thomas Chille"
Дата:
Сообщение: PLpgSQL-Problem
Следующее
От: Sebastian Böck
Дата:
Сообщение: Re: Problems with Triggers