| От | Tom Lane |
|---|---|
| Тема | Re: [SQL] Cache lookup failed with FUNCTION + TRIGGER |
| Дата | |
| Msg-id | 1236.933804434@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Cache lookup failed with FUNCTION + TRIGGER ("Stéphane FILLON" <fillons@offratel.nc>) |
| Список | pgsql-sql |
"Stéphane FILLON" <fillons@offratel.nc> writes:
> create function client() returns opaque as '
> begin
> if new.nocli ISNULL then
> raise exception "nocli null";
> end if;
> end;
> ' language 'plpgsql';
> create trigger client before insert on client
> for each row execute procedure client();
> When I try to insert a tuple in client I have the following error:
> "ERROR: fmgr_info: function 149857: cache lookup failed"
I'm guessing you dropped and recreated the function without dropping
and recreating the trigger. It looks like triggers link to functions
on the basis of OID, not name, so after you recreate the function (with
a new OID), the old trigger no longer has a procedure to execute...
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера