Re: [BUGS] BUG #14526: no unique or exclusion constraint matching theON CONFLICT - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: [BUGS] BUG #14526: no unique or exclusion constraint matching theON CONFLICT
Date
Msg-id CAH2-WzkqyLTcoktCdA66t-oC0niHEferNsZqRbd2kZuPp1pW7w@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14526: no unique or exclusion constraint matching the ON CONFLICT  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, Feb 8, 2017 at 10:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'm not following.  If the executor needs to check too, that's fine,
> but why is it okay for the planner not to check?  Assume that for some
> weird reason the user has both indimmediate and !indimmediate indexes
> on the same column set.  If the planner chooses the wrong one, don't
> bad things happen?

No, because the planner isn't limited to picking just one. It is
generally very likely that only one will be chosen, but edge cases
like this are considered. infer_arbiter_indexes() returns a list of
Oids of indexes.

-- 
Peter Geoghegan


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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14526: no unique or exclusion constraint matching the ON CONFLICT
Next
From: cinbau@warpmail.net
Date:
Subject: [BUGS] BUG #14536: Centos 7 gdal-libs Dependency Problem