| От | Mike Nolan |
|---|---|
| Тема | Re: PL/SQL question |
| Дата | |
| Msg-id | 200404212034.i3LKYXAe031029@gw.tssi.com обсуждение |
| Ответ на | Re: PL/SQL question (Jeff Eckermann <jeff_eckermann@yahoo.com>) |
| Список | pgsql-general |
> AFAIK, returning null from a trigger function causes > the whole operation (insert, update or delete) to be > aborted, so the transaction is rolled back, including > the insert inside the function. You want to return > NEW instead. That's true on a 'before insert' trigger. An 'after insert' trigger can return NULL because the insert that triggered it has already taken place and the value returned by the trigger function is ignored. That's why it was important to ask the original poster what kind of trigger it was 'before insert' or 'after insert'. -- Mike Nolan
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера