Pgsql conditions do not short circuit?

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Pgsql conditions do not short circuit?
Дата
Msg-id CC1CF380F4D70844B01D45982E671B2348E5E5@mtxexch01.add0.masergy.com
обсуждение исходный текст
Ответы Re: Pgsql conditions do not short circuit?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-interfaces
I have the following condition in a trigger function:
 IF (TG_OP = 'INSERT') OR (TG_OP = 'UPDATE' AND NEW.aggregate_flag !=
OLD.aggregate_flag)

When I cause this trigger to execute on an insert, it complains that OLD
is not defined yet.  If I reformat this so I check the last condition in
an IF nested in the "UPDATE" case, it works fine.  From this, I'm
concluding that pgsql conditions do not short circuit?

--
Guy Rouillier



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Help with adding C-Language Functions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Pgsql conditions do not short circuit?