Re: can a trigger on insert -> update other tables? - Mailing list pgsql-general

From Jan Wieck
Subject Re: can a trigger on insert -> update other tables?
Date
Msg-id 200103040952.EAA01508@jupiter.jw.home
Whole thread Raw
In response to Re: can a trigger on insert -> update other tables?  (will trillich <will@serensoft.com>)
Responses Re: can a trigger on insert -> update other tables?
List pgsql-general
will trillich wrote:
> [...]
>
> CREATE TRIGGER _rating_propagate
>    BEFORE INSERT ON _rating
>    FOR EACH ROW EXECUTE PROCEDURE _rating_propagate();
>
> ERROR: NEW used in non-rule function
>
> (this doesn't happen until an insert actually activates the
> trigger, so that plpgsql finally 'sees' the code of the procedure
> and tries to execute it.) so what else could i try?
>
> > And remember to do
> >  RETURN new
> > somewhere.
>
> right. but now i have a different problem... :)

    Can you add the line

        #option dump

    at the very top of your function (before DECLARE) and send me
    the debug output from the Postmaster?


Jan

--

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



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: postgres locks...
Next
From: Jan Wieck
Date:
Subject: Re: triggers vs "NEW" pseudorecord