Re: INSERT ... ON CONFLICT syntax issues
От | Andres Freund |
---|---|
Тема | Re: INSERT ... ON CONFLICT syntax issues |
Дата | |
Msg-id | 20150507173722.GD12950@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: INSERT ... ON CONFLICT syntax issues (Heikki Linnakangas <hlinnaka@iki.fi>) |
Ответы |
Re: INSERT ... ON CONFLICT syntax issues
Re: INSERT ... ON CONFLICT syntax issues |
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: