| От | Peter Eisentraut |
|---|---|
| Тема | Re: Pgsql conditions do not short circuit? |
| Дата | |
| Msg-id | 200502110248.41720.peter_e@gmx.net обсуждение исходный текст |
| Ответ на | Pgsql conditions do not short circuit? ("Guy Rouillier" <guyr@masergy.com>) |
| Список | pgsql-interfaces |
Guy Rouillier wrote: > 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? That is true, but it wouldn't have helped you anyway, because the error is caught during the semantic analysis before the execution phase. -- Peter Eisentraut http://developer.postgresql.org/~petere/
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера