pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Cache lookup failed with FUNCTION + TRIGGER
2+ messages / 2 participants
[nested] [flat]

* Cache lookup failed with FUNCTION + TRIGGER
@ 1999-08-04 03:21 Stéphane FILLON <fillons@offratel.nc>
  1999-08-04 22:07 ` Re: [SQL] Cache lookup failed with FUNCTION + TRIGGER Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Stéphane FILLON @ 1999-08-04 03:21 UTC (permalink / raw)
  To: pgsql-sql; pgsql admin <pgsql-admin@postgreSQL.org>

I have one table client :

create table client(
  nocli int4,
 ....
);

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"

Where does this come from ? That's not the first time that I have this kind
of message!!

Please H E L P !!!!

RedHat 5.2
PostgreSQL 6.5.1


Regards,

Stephane FILLON




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] Cache lookup failed with FUNCTION + TRIGGER
  1999-08-04 03:21 Cache lookup failed with FUNCTION + TRIGGER Stéphane FILLON <fillons@offratel.nc>
@ 1999-08-04 22:07 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 1999-08-04 22:07 UTC (permalink / raw)
  To: Stéphane FILLON <fillons@offratel.nc>; +Cc: pgsql-sql

"=?iso-8859-1?Q?St=E9phane_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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-08-04 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-08-04 03:21 Cache lookup failed with FUNCTION + TRIGGER Stéphane FILLON <fillons@offratel.nc>
1999-08-04 22:07 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox