Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: hlinnaka <hlinnaka(at)iki(dot)fi>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Subject: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Date: 2015-03-18 16:19:04
Message-ID: CA+TgmobT5pBUgSrJ0Jrp46K4SDipmCMdyFXXSg5TosD4A9D4ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 17, 2015 at 3:11 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> I've been thinking that it would be nice to be able to specify a constraint
> name. Naming an index directly feels wrong, as in relational and SQL
> philosophy, indexes are just an implementation detail, but naming a
> constraint is a fair game. It would also be nice to be able to specify "use
> the primary key".

Intuitively, I think you should specify an operator name, not a
constraint name. That's what we do for, e.g., exclusion constraints,
and it feels right. People sometimes create and drop indexes (and
thus, perhaps, the constraints that depend on them) for maintenance
reasons where a change in semantics will be unwelcome. But I don't
accept Peter's argument that it's OK to be indifferent to which
particular equality semantics are being used.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-03-18 16:23:13 Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Previous Message Svenne Krap 2015-03-18 16:18:02 Re: WIP Patch for GROUPING SETS phase 1