On 2015-05-07 16:15:18 +0300, Heikki Linnakangas wrote: > On 05/07/2015 12:01 AM, Andres Freund wrote: > >6. The tablename and EXCLUDED? Possibility with the ability to specify > > an AS for INSERT INTO foo AS whatever? > > If we don't allow "AS whatever", and you create a table called "excluded", > you're stuck with the ambiguity in the DO UPDATE statement as you can't > alias either one. So we have to add support for "INSERT INTO foo AS > whatever", if we go with <tablename> and EXCLUDED. > > Does anyone see a problem with "INSERT INTO foo AS whatever"? It seems > pretty straightforward to implement.
I don't see a problem at all, with one exception: If we want the AS to be optional like in a bunch of other places, we have to either promote VALUES to a reserved keyword, only accept unreserved keywords, or play precedence games. I think it'd be perfectly fine to not make AS optional. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers