Robert Haas <robertmh...@gmail.com> writes: > On Fri, Feb 12, 2010 at 8:06 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> We could possibly put in some hack to disallow OLD/NEW references in >> the WITH queries, but that got past my threshold of ugliness, so >> I'm not going to commit it without further discussion.
> On the face of it it's not obvious to me why you wouldn't just do > that. If it's not valid to reference them there, then just don't let > it happen (now comes the part where you tell me why it's not that > simple). Well, there's no obvious-to-the-user reason why it shouldn't work. If we hack it, then an example like I gave will give a "no such table" error, and I'll bet long odds we'll get bug reports about it. (Now maybe we could suppress the bug reports if we could get it to print something more like "NEW can't be referenced in WITH", but doing that seems significantly harder --- the way that I can see to do it would be to not have NEW/OLD in the namespace while parsing WITH, and that would lead to a pretty stupid error message.) regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers