Re: "OLD used in query that is not in a rule" - Mailing list pgsql-general

From Tom Lane
Subject Re: "OLD used in query that is not in a rule"
Date
Msg-id 25303.1332773516@sss.pgh.pa.us
Whole thread Raw
In response to "OLD used in query that is not in a rule"  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Responses Re: "OLD used in query that is not in a rule"
List pgsql-general
"Gauthier, Dave" <dave.gauthier@intel.com> writes:
> I get... "OLD used in query that is not in a rule" when trying to ref, for example, OLD.tblcol1, from inside a stored
procedure. Is this saying you cannot use OLD.* (or NEW.* I suppose) unless it's from within a trigger function (returns
type"trigger")? 

Certainly.  You'd have to pass the field (or whole record) as a
parameter.  It's not some kind of magic global variable, it's
a predefined local variable in a trigger function (or rule).

            regards, tom lane

pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: "OLD used in query that is not in a rule"
Next
From: "Gauthier, Dave"
Date:
Subject: Re: "OLD used in query that is not in a rule"