pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
fmgr_info: function 15238119: cache lookup failed
2+ messages / 1 participants
[nested] [flat]

* fmgr_info: function 15238119: cache lookup failed
@ 2003-11-20 02:37 Iain <iain@mst.co.jp>
  0 siblings, 0 replies; 2+ messages in thread

From: Iain @ 2003-11-20 02:37 UTC (permalink / raw)
  To: pgsql-sql

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

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

* Re: fmgr_info: function 15238119: cache lookup failed
@ 2003-11-20 02:53 Iain <iain@mst.co.jp>
  0 siblings, 0 replies; 2+ messages in thread

From: Iain @ 2003-11-20 02:53 UTC (permalink / raw)
  To: pgsql-sql

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

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


end of thread, other threads:[~2003-11-20 02:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-20 02:37 fmgr_info: function 15238119: cache lookup failed Iain <iain@mst.co.jp>
2003-11-20 02:53 Re: fmgr_info: function 15238119: cache lookup failed Iain <iain@mst.co.jp>

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