Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-20 Thread Tom Lane
Jan Wieck writes: > On 11/20/2009 1:12 AM, Tom Lane wrote: >> Jan Wieck writes: >>> But this brings up another point about the recent discussion of what >>> RENAME is good for. Removing RENAME may conflict with using OLD/NEW in >>> UPDATE ... RETURNING. No? >> >> Um ... not sure why. Specific

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-19 Thread Jan Wieck
On 11/20/2009 1:12 AM, Tom Lane wrote: Jan Wieck writes: But this brings up another point about the recent discussion of what RENAME is good for. Removing RENAME may conflict with using OLD/NEW in UPDATE ... RETURNING. No? Um ... not sure why. Specific example please?

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-19 Thread Tom Lane
Jan Wieck writes: > But this brings up another point about the recent discussion of what > RENAME is good for. Removing RENAME may conflict with using OLD/NEW in > UPDATE ... RETURNING. No? Um ... not sure why. Specific example please? regards, tom lane -- Sent via p

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-19 Thread Jan Wieck
On 11/5/2009 4:33 PM, Tom Lane wrote: So I was testing the next step of plpgsql modification, namely actually letting the parser hooks do something, and it promptly blew up in trigger functions, like so: + ERROR: OLD used in query that is not in a rule + LINE 1: SELECT OLD + ^

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-08 Thread Josh Berkus
Tom, > BTW, this brings up another point, which is that up to now it's often > been possible to use plpgsql variable names that conflict with > core-parser reserved words, so long as you didn't need to use the > reserved word with its special meaning. That will stop working when > this patch goes

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-06 Thread David Fetter
On Thu, Nov 05, 2009 at 04:33:07PM -0500, Tom Lane wrote: > So I was testing the next step of plpgsql modification, namely actually > letting the parser hooks do something, and it promptly blew up in > trigger functions, like so: > > + ERROR: OLD used in query that is not in a rule > + LINE 1: SE

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-05 Thread Tom Lane
Robert Haas writes: >> BTW, this brings up another point, which is that up to now it's often >> been possible to use plpgsql variable names that conflict with >> core-parser reserved words, so long as you didn't need to use the >> reserved word with its special meaning.  That will stop working whe

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-05 Thread Robert Haas
On Thu, Nov 5, 2009 at 4:33 PM, Tom Lane wrote: > So I was testing the next step of plpgsql modification, namely actually > letting the parser hooks do something, and it promptly blew up in > trigger functions, like so: > > + ERROR:  OLD used in query that is not in a rule > + LINE 1: SELECT  OLD

Re: [HACKERS] Why do OLD and NEW have special internal names?

2009-11-05 Thread Kevin Grittner
Tom Lane wrote: > been possible to use plpgsql variable names that conflict with > core-parser reserved words, so long as you didn't need to use the > reserved word with its special meaning. That will stop working when > this patch goes in. Doesn't bother me any, but if anyone thinks it's > a

[HACKERS] Why do OLD and NEW have special internal names?

2009-11-05 Thread Tom Lane
So I was testing the next step of plpgsql modification, namely actually letting the parser hooks do something, and it promptly blew up in trigger functions, like so: + ERROR: OLD used in query that is not in a rule + LINE 1: SELECT OLD + ^ + QUERY: SELECT OLD + CONTEXT: SQL st