Re: GSOC13 proposal - extend RETURNING syntax - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GSOC13 proposal - extend RETURNING syntax
Date
Msg-id 25357.1367507853@sss.pgh.pa.us
Whole thread Raw
In response to Re: GSOC13 proposal - extend RETURNING syntax  (David Fetter <david@fetter.org>)
Responses Re: GSOC13 proposal - extend RETURNING syntax  (Karol Trzcionka <karlikt@gmail.com>)
List pgsql-hackers
David Fetter <david@fetter.org> writes:
> 1.  As the SQL standard mandates that OLD and NEW be reserved words, we'll re-reserve them.

As I mentioned yesterday, I'm not exactly thrilled with re-reserving
those, and especially not NEW as it is utterly unnecessary (since the
default would already be to return the NEW column).

It should in any case be possible to do this without converting them to
reserved words; rather the implementation could be that those table
aliases are made available when parsing the UPDATE RETURNING expressions.
(This is, in fact, the way that rules use these names now.)  Probably it
should work something like "add these aliases if they don't already
exist in the query", so as to avoid breaking existing applications.

I don't really see a lot of value in hacking the behavior of either
INSERT RETURNING or DELETE RETURNING.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Confusing comment in xlog.c or am I missing something?
Next
From: Karol Trzcionka
Date:
Subject: Re: GSOC13 proposal - extend RETURNING syntax