Search Postgresql Archives

Re: "OLD used in query that is not in a rule"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK, and understood.  
And yes, I thought it was a global.

Thanks Tom.

-----Original Message-----
From: Tom Lane [mailto:tgl@xxxxxxxxxxxxx] 
Sent: Monday, March 26, 2012 10:52 AM
To: Gauthier, Dave
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  "OLD used in query that is not in a rule" 

"Gauthier, Dave" <dave.gauthier@xxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux