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 EBB2DD1D5FA for ; Thu, 20 Nov 2003 02:38:11 +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 23421-03 for ; Wed, 19 Nov 2003 22:37:43 -0400 (AST) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id 8A258D1D554 for ; Wed, 19 Nov 2003 22:37:29 -0400 (AST) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id hAK2S5i19532 for ; Thu, 20 Nov 2003 11:28:05 +0900 Message-ID: <004101c3af0f$40653290$7201a8c0@mst1x5r347kymb> From: "Iain" To: Subject: fmgr_info: function 15238119: cache lookup failed Date: Thu, 20 Nov 2003 11:37:33 +0900 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003D_01C3AF5A.B026B4F0" 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.9 tagged_above=0.0 required=5.0 tests=HTML_30_40, HTML_FONT_FACE_ODD X-Spam-Level: X-Archive-Number: 200311/246 X-Sequence-Number: 16061 This is a multi-part message in MIME format. ------=_NextPart_000_003D_01C3AF5A.B026B4F0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit 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_003D_01C3AF5A.B026B4F0 Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable
Hi All,
 
I have a problem with a before up= date=20 trigger that I was wondering if someone might be able to give me some help= =20 with.
 
DB version is 7.2. Here is a= cut down=20 version of an already simple trigger and function that is returning the=20 error:
 
    fmgr_info: fun= ction=20 15238119: cache lookup failed
 
CREATE FUNCTION f_hatyuu_detail( = ) RETURNS=20 opaque  AS '
BEGIN
raise notice ''f_hatyuu_detail started = =20 TG_WHEN=3D %  TG_OP=3D %'',TG_WHEN, TG_OP;
 
 if TG_WH= EN=20 <> ''BEFORE'' or TG_OP <> ''UPDATE'' then
  return= =20 null;
 end if;
 
raise notice ''debug 3'';
&nbs= p;return=20 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 t= able, I=20 get the abovementioned error on the RETURN NEW; The debug 4 message is not= =20 displayed. If I return NULL it operates as expected (0 rows updated). Did I= miss=20 something here?
 
regards
Iain
------=_NextPart_000_003D_01C3AF5A.B026B4F0--