Re: UPSERT wiki page, and SQL MERGE syntax - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: UPSERT wiki page, and SQL MERGE syntax
Date
Msg-id 1412966669.60454.YahooMailNeo@web122305.mail.ne1.yahoo.com
Whole thread Raw
In response to Re: UPSERT wiki page, and SQL MERGE syntax  (Peter Geoghegan <pg@heroku.com>)
Responses Re: UPSERT wiki page, and SQL MERGE syntax
Re: UPSERT wiki page, and SQL MERGE syntax
List pgsql-hackers
Peter Geoghegan <pg@heroku.com> wrote:
> On Fri, Oct 10, 2014 at 11:05 AM, Robert Haas <robertmhaas@gmail.com> wrote:

>> I actually like this syntax reasonably well in some ways, but I don't
>> like that we're mentioning the index name, and the CONFLICTING()
>> notation is decidedly odd.
>
> People keep remarking that they don't like that you can (optionally)
> name a unique index explicitly, and I keep telling them why I've done
> it that way [1]. There is a trade-off here. I am willing to go another
> way in that trade-off, but let's have a realistic conversation about
> it.

We've all read that, and your repeated arguments for that point of
view.  We disagree and have said why.  What in that is not a
realistic conversation?

To restate: to do so is conflating the logical definition of the 
database with a particular implementation detail.  As just one 
reason that is a bad idea: we can look up unique indexes on the 
specified columns, but if we implement a other storage techniques 
where there is no such thing as a unique index on the columns, yet 
manage to duplicate the semantics (yes, stranger things have 
happened), people can't migrate to the new structure without 
rewriting their queries.  If the syntax references logical details 
(like column names) there is no need to rewrite.  We don't want to 
be painted into a corner.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: UPSERT wiki page, and SQL MERGE syntax
Next
From: Peter Geoghegan
Date:
Subject: Re: UPSERT wiki page, and SQL MERGE syntax