diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-12-01 15:48:06 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-12-01 16:27:18 +0100 |
commit | 5d40b3c4f6cae974160cde49932eb1e0c2d04213 (patch) | |
tree | 8afc8c12b638dced3f47d5570426da118cae5300 /src/backend/replication/logical/tablesync.c | |
parent | 0bd682246a619fd8eb9b538f1af61afb991b06b4 (diff) | |
download | postgresql-5d40b3c4f6cae974160cde49932eb1e0c2d04213.tar.gz postgresql-5d40b3c4f6cae974160cde49932eb1e0c2d04213.zip |
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
Diffstat (limited to 'src/backend/replication/logical/tablesync.c')
0 files changed, 0 insertions, 0 deletions