forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit267f33f
committed
Check collation when creating partitioned index
When creating a partitioned index, the partition key must be a subsetof the index's columns. But this currently doesn't check that thecollations 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 itwould have to be crafted explicitly and is not something that wouldjust happen by accident.)This patch adds the required collation check. As a result, anypreviously allowed unique index that has a collation mismatch would nolonger 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.org1 parent1dac2dd commit267f33f
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1011 | 1011 |
| |
1012 | 1012 |
| |
1013 | 1013 |
| |
1014 |
| - | |
| 1014 | + | |
1015 | 1015 |
| |
1016 | 1016 |
| |
1017 | 1017 |
| |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1018 | 1021 |
| |
1019 | 1022 |
| |
1020 | 1023 |
| |
|
0 commit comments
Comments
(0)