Re: BUG #14526: no unique or exclusion constraint matching the ON CONFLICT

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tiago Babo <tiago(dot)babo(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14526: no unique or exclusion constraint matching the ON CONFLICT
Date: 2017-02-08 18:57:40
Message-ID: CAH2-WzkqyLTcoktCdA66t-oC0niHEferNsZqRbd2kZuPp1pW7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Feb 8, 2017 at 10:51 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message cinbau 2017-02-08 19:56:48 BUG #14536: Centos 7 gdal-libs Dependency Problem
Previous Message Tom Lane 2017-02-08 18:51:21 Re: BUG #14526: no unique or exclusion constraint matching the ON CONFLICT