* Robert Haas (robertmh...@gmail.com) wrote:
> On Mon, Apr 27, 2015 at 7:21 PM, Peter Geoghegan <p...@heroku.com> wrote:
> > On Mon, Apr 27, 2015 at 10:20 AM, Bruce Momjian <br...@momjian.us> wrote:
> >> Agreed, and I like the DO [ UPDATE | NOTHING ] too.
> >
> > Here is what I think I need to do:
> >
> > * Don't change the ON CONFLICT spelling.
> 
> What I proposed originally was ON DUPLICATE.  Not ON CONFLICT.  And I
> still like that better.  ON UNIQUE CONFLICT, which Andres mentioned,
> gets us there too, but it's

My general feeling is "keep it short" but I'm not particular beyond
that.  I do like the idea that we'll be able to support more options in
the future.

> > * Don't change the names of the pseudo-alias EXCLUDED.* (or the alias
> > TARGET.*). Those seem fine to me as well.
> 
> There seem to be a few votes for NEW and OLD.  That's what I proposed
> originally, and (surprise, surprise) I still like that better too.

I was promoting NEW/OLD, until I realized that we'd end up having a
problem in trigger functions because NEW/OLD are already defined there,
unless you have a suggestion for how to improve on that?

> > * Finally, add "ON CONFLICT ON CONSTRAINT my_constraint" support, so
> > you can name (exactly one) constraint by name. Particularly useful for
> > unique constraints. I really don't want to make this accept multiple
> > constraints, even though we may infer multiple constraints, because
> > messy, and is probably too complex to every be put to good use
> > (bearing in mind that exclusion constraints, that really need this,
> > will still only be supported by the IGNORE/DO NOTHING variant).
> 
> I still think that constraints should never be named in the syntax.

I guess I don't see a particular problem with that..?  Perhaps I'm
missing something, but if there's multiple ways for something to
conflict, it might be nice to be able to differentiate between them?
Then again, I'm not sure if that's what the intent here is.

        Thanks!

                Stephen

Attachment: signature.asc
Description: Digital signature

Reply via email to