Re: should check collations when creating partitioned index
От | Jeff Davis |
---|---|
Тема | Re: should check collations when creating partitioned index |
Дата | |
Msg-id | f3d6bcc63fdbd80d98ccbef975df5f0a55f58cd9.camel@j-davis.com обсуждение исходный текст |
Ответ на | should check collations when creating partitioned index (Peter Eisentraut <peter@eisentraut.org>) |
Ответы |
Re: should check collations when creating partitioned index
|
Список | pgsql-hackers |
On Mon, 2023-11-13 at 10:24 +0100, Peter Eisentraut wrote: > create table t1 (a int, b text) partition by hash (b); > create table t1a partition of t1 for values with (modulus 2, > remainder 0); > create table t1b partition of t1 for values with (modulus 2, > remainder 1); > create unique index i1 on t1 (b collate case_insensitive); > insert into t1 values (1, 'a'), (2, 'A'); -- this succeeds > > The attached patch adds the required collation check. In the > example, > it would not allow the index i1 to be created. In the patch, you check for an exact collation match. Considering this case only depends on equality, I think it would be correct if the requirement was that (a) both collations are deterministic; or (b) the collations match exactly. This is related to the discussion here: https://postgr.es/m/b7a9f32eee8d24518f791168bc6fb653d1f95f4d.camel@j-davis.com Regards, Jeff Davis
В списке pgsql-hackers по дате отправления: