| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера