Re: PL/SQL question

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: "Lee Harr"
Дата:
Сообщение: Re: Ordering YYYY MM DD in reverse chrono order
Следующее
От: "Eric Dahnke"
Дата:
Сообщение: Multiple DBs, One app, How to do relations?