X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0789BD1CA65 for ; Thu, 20 Nov 2003 02:53:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 20628-09 for ; Wed, 19 Nov 2003 22:53:04 -0400 (AST) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id 90040D1B57C for ; Wed, 19 Nov 2003 22:52:59 -0400 (AST) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id hAK2hai19578 for ; Thu, 20 Nov 2003 11:43:36 +0900 Message-ID: <004c01c3af11$6b874d80$7201a8c0@mst1x5r347kymb> From: "Iain" To: Subject: Re: fmgr_info: function 15238119: cache lookup failed Date: Thu, 20 Nov 2003 11:53:04 +0900 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0048_01C3AF5C.DB3F32F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=BAYES_30, HTML_40_50, HTML_FONT_FACE_ODD X-Spam-Level: X-Archive-Number: 200311/247 X-Sequence-Number: 16062 This is a multi-part message in MIME format. ------=_NextPart_000_0048_01C3AF5C.DB3F32F0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Ooops! I fixed it. Somewhere along the line the name of the trigger had changed, and there was an old, probably invalidated trigger left on the table. Once I dropped that it was OK. Sorry for the inconvenience! Regards Iain ----- Original Message ----- From: Iain To: pgsql-sql@postgresql.org Sent: Thursday, November 20, 2003 11:37 AM Subject: fmgr_info: function 15238119: cache lookup failed Hi All, I have a problem with a before update trigger that I was wondering if someone might be able to give me some help with. DB version is 7.2. Here is a cut down version of an already simple trigger and function that is returning the error: fmgr_info: function 15238119: cache lookup failed CREATE FUNCTION f_hatyuu_detail( ) RETURNS opaque AS ' BEGIN raise notice ''f_hatyuu_detail started TG_WHEN= % TG_OP= %'',TG_WHEN, TG_OP; if TG_WHEN <> ''BEFORE'' or TG_OP <> ''UPDATE'' then return null; end if; raise notice ''debug 3''; return new; raise notice ''debug 4''; END; ' LANGUAGE 'plpgsql'; drop trigger TG_D_HATYUU_DETAIL_B on D_HATYUU_DETAIL; create trigger TG_D_HATYUU_DETAIL_B BEFORE update on D_HATYUU_DETAIL for each row execute procedure f_hatyuu_detail(); When I do an UPDATE against the table, I get the abovementioned error on the RETURN NEW; The debug 4 message is not displayed. If I return NULL it operates as expected (0 rows updated). Did I miss something here? regards Iain ------=_NextPart_000_0048_01C3AF5C.DB3F32F0 Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable
Ooops! I fixed it. Somewhere alon= g the=20 line the name of the trigger had changed, and there was an old, probably=20 invalidated trigger left on the table. Once I dropped that it was=20 OK.
 
Sorry for the inconvenience!
 
Regards
Iain
----- Original Message -----
From:=20 Iain
To: pgsql-sql@postgresql.org
Sent: Thursday, November 20= , 2003=20 11:37 AM
Subject: fmgr_info: functio= n=20 15238119: cache lookup failed

Hi All,
 
I have a problem with a before = update=20 trigger that I was wondering if someone might be able to give me some hel= p=20 with.
 
DB version is 7.2. Here is= a cut=20 down version of an already simple trigger and function that is returning = the=20 error:
 
    fmgr_info: f= unction=20 15238119: cache lookup failed
 
CREATE FUNCTION f_hatyuu_detail= ( )=20 RETURNS opaque  AS '
BEGIN
raise notice ''f_hatyuu_detail=20 started  TG_WHEN=3D %  TG_OP=3D %'',TG_WHEN,=20 TG_OP;
 
 if TG_WHEN <> ''BEFORE'' or TG_OP <>= ;=20 ''UPDATE'' then
  return null;
 end if;
 
raise notice ''debug=20 3'';
 return new;
raise notice ''debug 4'';
END;
 ' LANGUAGE=20 'plpgsql';
 
drop trigger TG_D_HATYUU_DETAIL= _B on=20 D_HATYUU_DETAIL;
create trigger TG_D_HATYUU_DETAIL_B BEFORE update on= =20 D_HATYUU_DETAIL for each row
execute procedure=20 f_hatyuu_detail();
When I do an UPDATE against the= table, I=20 get the abovementioned error on the RETURN NEW; The debug 4 message is no= t=20 displayed. If I return NULL it operates as expected (0 rows updated). Did= I=20 miss something here?
 
regards
Iain
------=_NextPart_000_0048_01C3AF5C.DB3F32F0--