On Tue, May 5, 2015 at 8:52 AM, Heikki Linnakangas <hlinn...@iki.fi> wrote:
> I've read through all the error messages in the patch. Some comments:

I'll work through this feedback.

> postgres=# create table foo (id int4);
> CREATE TABLE
> postgres=# create unique index foo_y on foo (id) where id > 0;
> CREATE INDEX
> postgres=# insert into foo values (-1)  on conflict (id) where id > 0 do
> nothing;
> ERROR:  inferred arbiter partial unique index's predicate does not cover
> tuple proposed for insertion
> DETAIL:  ON CONFLICT inference clause implies that the tuple proposed for
> insertion must be covered by the predicate of partial index "foo_y".
>
> I'm surprised. If the inserted value doesn't match the WHERE clause of the
> constraint, there is clearly no conflict, so I would assume the above to
> work without error.

I'm not particularly attached to that behavior. I could revert it.


-- 
Peter Geoghegan


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

Reply via email to