Re: [BUGS] BUG #14526: no unique or exclusion constraint matching theON CONFLICT

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [BUGS] BUG #14526: no unique or exclusion constraint matching theON CONFLICT
Дата
Msg-id CAH2-Wz=h4uZuFwAPmU3eNZ-mh=PorhSw75Nt0HYgsWV9GtUMOg@mail.gmail.com
обсуждение исходный текст
Ответ на [BUGS] BUG #14526: no unique or exclusion constraint matching the ON CONFLICT  (tiago.babo@gmail.com)
Ответы Re: [BUGS] BUG #14526: no unique or exclusion constraint matching theON CONFLICT  (Tiago Babo <tiago.babo@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: leohuanruan@gmail.com
Дата:
Сообщение: [BUGS] BUG #14530: Logical Decoding Slowness
Следующее
От: CR VV
Дата:
Сообщение: Re: [BUGS] BUG #14524: Commands compare with nested subqueryexpressions fail with "should not reference subplan var"