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-Wz=h4uZuFwAPmU3eNZ-mh=PorhSw75Nt0HYgsWV9GtUMOg@mail.gmail.com
Whole thread Raw
In response to [BUGS] BUG #14526: no unique or exclusion constraint matching the ON CONFLICT  (tiago.babo@gmail.com)
Responses Re: [BUGS] BUG #14526: no unique or exclusion constraint matching theON CONFLICT  (Tiago Babo <tiago.babo@gmail.com>)
List pgsql-bugs
On Thu, Feb 2, 2017 at 6:07 AM,  <tiago.babo@gmail.com> wrote:
> INSERT INTO accounts (type, person_id) VALUES ('PersonAccount', 1) ON
> CONFLICT (type, person_id) WHERE type = 'PersonAccount' DO UPDATE SET
> updated_at = EXCLUDED.updated_at RETURNING *
>
> I also have an unique INDEX:
>
> CREATE UNIQUE INDEX uniq_person_accounts ON accounts USING btree (type,
> person_id) WHERE ((type)::text = 'PersonAccount'::text);

Can you show the table definition? From psql, "\d+ accounts"


-- 
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: leohuanruan@gmail.com
Date:
Subject: [BUGS] BUG #14530: Logical Decoding Slowness
Next
From: CR VV
Date:
Subject: Re: [BUGS] BUG #14524: Commands compare with nested subqueryexpressions fail with "should not reference subplan var"