Re: BUG #13917: "upsert" construct doesn't work with partial index - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #13917: "upsert" construct doesn't work with partial index
Date
Msg-id CAM3SWZTvWV+jANWY1qE-f9vyqJw6_M0cgcHhBrAueAU5H6MmVQ@mail.gmail.com
Whole thread Raw
In response to BUG #13917: "upsert" construct doesn't work with partial index  (dv@unlimitedsoftware.it)
List pgsql-bugs
On Thu, Feb 4, 2016 at 8:31 AM,  <dv@unlimitedsoftware.it> wrote:
> an INSERT ... ON CONFLICT DO NOTHING statement doesn't twork if unique index
> on duplicated field is created without "where" clause. In case of co called
> "partial index" the duplicate key exception rises.

Please provide a concrete test case. I think you just need to spell
out the WHERE clause in the inference specification. That will use
both indexes (the partial unique index, as well as the non-partial
unique index on the same fields).


--
Peter Geoghegan

pgsql-bugs by date:

Previous
From: dominik.kosiorek@infobright.com
Date:
Subject: BUG #13934: wrong result of split_part with char value
Next
From: jeffrey.osborn@am.sony.com
Date:
Subject: BUG #13928: Initdb.bat will not install if path has a space.