Re: Unique indexes & constraints on partitioned tables
От | Alvaro Herrera |
---|---|
Тема | Re: Unique indexes & constraints on partitioned tables |
Дата | |
Msg-id | 20171225213353.oy3umayus3nay7wa@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: Unique indexes & constraints on partitioned tables (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
Список | pgsql-hackers |
Amit Langote wrote: > Have you considered what happens when ON CONFLICT code tries to depend on > such an index (a partitioned unique index)? Not yet, but it was on my list of things to fix. Thanks for working on it -- I'll be reviewing this soon. > +create table parted_conflict_test_2 partition of parted_conflict_test for values in (2); > +create unique index on parted_conflict_test (a); > +insert into parted_conflict_test values (1, 'a') on conflict (a) do nothing; > +insert into parted_conflict_test values (1, 'b') on conflict (a) do update set b = excluded.b; > +insert into parted_conflict_test values (1, 'b') on conflict (a) do update set b = excluded.b where parted_conflict_test.b= 'a'; > +select * from parted_conflict_test; > + a | b > +---+--- > + 1 | b > +(1 row) sweet. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: