forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5d40b3c
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 parent0bd6822 commit5d40b3c
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
935 | 935 |
| |
936 | 936 |
| |
937 | 937 |
| |
938 |
| - | |
| 938 | + | |
939 | 939 |
| |
940 | 940 |
| |
941 | 941 |
| |
| 942 | + | |
| 943 | + | |
| 944 | + | |
942 | 945 |
| |
943 | 946 |
| |
944 | 947 |
| |
|
0 commit comments
Comments
(0)