Re: can a trigger on insert -> update other tables?

From: Jan Wieck <janwieck(at)Yahoo(dot)com>
To: will trillich <will(at)serensoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can a trigger on insert -> update other tables?
Date: 2001-03-04 09:52:16
Message-ID: 200103040952.EAA01508@jupiter.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Yahoo(dot)com #

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2001-03-04 12:07:24 Re: triggers vs "NEW" pseudorecord
Previous Message Bell John 2001-03-04 09:01:58 Set Like Data