Re: function problems.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: function problems.
Дата
Msg-id 22691.1035555100@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: function problems.  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-novice
Oliver Elphick <olly@lfix.co.uk> writes:
> A BEFORE trigger must return the NEW row after possible alterations --
> returning NULL will abort the update or insert, so this must be changed
> to be an AFTER trigger.

Or leave it as a BEFORE trigger and do "RETURN NEW" at the end.

I'd recommend BEFORE triggers over AFTER triggers anytime you have the
choice, because AFTER triggers go into a list of things-to-do-later;
if that list gets large (ie, you do many updates in one command) you
will have performance problems.

            regards, tom lane

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

Предыдущее
От: Ludwig Lim
Дата:
Сообщение: Re: function problems.
Следующее
От: "Rick Szeto"
Дата:
Сообщение: Latin1 characters in sql scripts