Re: minimal update
От | Decibel! |
---|---|
Тема | Re: minimal update |
Дата | |
Msg-id | 150717AA-3427-4FC4-99CD-547B6505AA69@decibel.org обсуждение исходный текст |
Ответ на | Re: minimal update (Andrew Dunstan <andrew@dunslane.net>) |
Список | pgsql-hackers |
On Oct 22, 2008, at 1:43 PM, Andrew Dunstan wrote: > + if (!CALLED_AS_TRIGGER(fcinfo)) > + elog(ERROR, "min_update_trigger: not called by trigger > manager"); The error I get in 8.2 when calling a trigger function directly is: ERROR: trigger functions may only be called as triggers To stay consistent, I think the remaining errors should s/: not/ may only be/, ie: min_update_trigger may only be called on update > + /* and that it's called on update */ > + if (! TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event)) > + elog(ERROR, "min_update_trigger: not called on update"); > + > + /* and that it's called before update */ > + if (! TRIGGER_FIRED_BEFORE(trigdata->tg_event)) > + elog(ERROR, "min_update_trigger: not called before update"); > + > + /* and that it's called for each row */ > + if (! TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) > + elog(ERROR, "min_update_trigger: not called for each row"); -- Decibel!, aka Jim C. Nasby, Database Architect decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828
В списке pgsql-hackers по дате отправления: