Re: INSERT ... ON CONFLICT syntax issues
От | Bruce Momjian |
---|---|
Тема | Re: INSERT ... ON CONFLICT syntax issues |
Дата | |
Msg-id | 20150427172005.GA21038@momjian.us обсуждение исходный текст |
Ответ на | Re: INSERT ... ON CONFLICT syntax issues (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: INSERT ... ON CONFLICT syntax issues
|
Список | pgsql-hackers |
On Sun, Apr 26, 2015 at 09:34:12AM -0400, Stephen Frost wrote: > * Heikki Linnakangas (hlinnaka@iki.fi) wrote: > > On 04/25/2015 12:01 PM, Andres Freund wrote: > > >INSERT ... ON CONFLICT (cola, colb [WHERE predicate_for_partial]) UPDATE|IGNORE > > > > > >My problem with the WHERE being inside the parens in the above is that > > >it's > > >a) different from CREATE INDEX > > >b) unclear whether the WHERE belongs to colb or the whole index > > > expression. The equivalent for aggregates, which I bet is going to be > > > used less often, caused a fair amount of confusing. > > > > > >That's why I wanted the WHERE outside the (), which requires either > > >adding DO between the index inference clause, and the action, to avoid > > >ambiguities in the grammar. > > > > Yeah, having the WHERE outside the parens seems much nicer. What is > > the ambiguity? > > I like having it outside the parens also. Agreed, and I like the DO [ UPDATE | NOTHING ] too. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
В списке pgsql-hackers по дате отправления: