Re: a trigger question - Mailing list pgsql-general

From Jan Wieck
Subject Re: a trigger question
Date
Msg-id 200206061901.g56J1ZV27320@saturn.janwieck.net
Whole thread Raw
In response to a trigger question  (pblunat <pblunat@ujf-grenoble.fr>)
List pgsql-general
pblunat wrote:
> Hi,
> i have a problem with "cache lookup failled" when an insert is made in a
> table with a trigger.
> Error message is : "ERROR : fmgr_info : function 16586 : cache lookup
> failed"
> Quest.: where this problem is ?

    You  have  dropped  and  recreated a trigger function without
    dropping and redefining the trigger itself.  The  trigger  on
    the  table has a dangling reference to the functions old OID.

    Whenever you do DROP FUNCTION for a trigger, be  sure  to  do
    the DROP/CREATE TRIGGER as well.

    In  v7.2  you  could  alternatively  use  CREATE  OR  REPLACE
    FUNCTION to avoid this problem.

> and where the documentation is on this subject ?.

    Well hidden :-)

> I made :
> GRANT ALL PRIVILEGES ON  all table and trigger,
> trigger is a very simple program for cut string (OK when stand alone).
>
> I am so sorry but beginers in english + beg. in trigger proc. + project'
> stress = problem.

    And a voice out of the chaos spoke to me and said "smile  and
    be  happy, it could be worse". And I smiled. And I was happy.
    And It went worse.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: a trigger question
Next
From: "Joshua b. Jore"
Date:
Subject: Re: How do I install Postgre on Windows NT?