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=J+AtQg5xEm3y6GUO=KfzqsfKy89Vzn0-NayjkF_baVw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #14526: no unique or exclusion constraint matching the ON CONFLICT (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [BUGS] BUG #14526: no unique or exclusion constraint matching theON CONFLICT
|
Список | pgsql-bugs |
On Tue, Feb 7, 2017 at 12:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Hm. I looked at infer_arbiter_indexes, which is the place where this > particular error is thrown, and realized that my previous assertion > was wrong: it *does* try to prove applicability of partial indexes > based on the ON CONFLICT WHERE clause. I must have misunderstood. ON CONFLICT accepts a WHERE clause as part of the inference specification itself entirely because that is sometimes useful. > So actually it should be > deciding that uniq_person_accounts is a usable unique index --- at > least, if you always have "WHERE type = 'PersonAccount'" in the > ON CONFLICT clause. Maybe you're sometimes leaving that out? That's the simplest answer. Tiago? -- 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 по дате отправления: