pgsql: Check collation when creating partitioned index

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Check collation when creating partitioned index
Дата
Msg-id E1r95Ue-0087vJ-4B@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Check collation when creating partitioned index

When creating a partitioned index, the partition key must be a subset
of the index's columns.  But this currently doesn't check that the
collations between the partition key and the index definition match.
So you can construct a unique index that fails to enforce uniqueness.
(This would most likely involve a nondeterministic collation, so it
would have to be crafted explicitly and is not something that would
just happen by accident.)

This patch adds the required collation check.  As a result, any
previously allowed unique index that has a collation mismatch would no
longer be allowed to be created.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/3327cb54-f7f1-413b-8fdb-7a9dceebb938%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a11c9c42ea3193ff7a977764788bda43ebb07b35

Modified Files
--------------
src/backend/commands/indexcmds.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: pgsql: meson: docs: Add {html,man} targets, rename install-doc-*
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: pgindent fix