On Sun, Apr 26, 2015 at 09:34:12AM -0400, Stephen Frost wrote:
> * Heikki Linnakangas (hlinn...@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  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to