Re: INSERT ... ON CONFLICT syntax issues

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Subject: Re: INSERT ... ON CONFLICT syntax issues
Date: 2015-05-06 20:05:16
Message-ID: CAM3SWZR=edOW29GDhenJKxLk6-UU8PZyXAw_XaJ_zcQaK=t1mQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 6, 2015 at 7:53 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> In this variant, you explicitly specify the constraint by name.
>
> I do think it's a bit sad to not be able to specify unique indexes that
> aren't constraints. So I'd like to have a corresponding ON INDEX - which
> would be trivial.

Then what's the point of having ON CONSTRAINT? The point of it working
that way was we're not exposing the "implementation detail" of the
index. While I happen to think that that's a distinction without a
difference anyway, that certainly was the idea.

I would care about the fact that you can't name a unique index with no
constraint if there wasn't already a way of doing that with inference
(I'm thinking in particular of partial indexes here, which never have
constraints). But there is. So what's the problem?
--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-05-06 20:16:04 Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0
Previous Message Tomas Vondra 2015-05-06 20:03:50 Re: multivariate statistics / patch v6