forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3c49fa2
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 parentefb8046 commit3c49fa2
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
984 | 984 |
| |
985 | 985 |
| |
986 | 986 |
| |
987 |
| - | |
| 987 | + | |
988 | 988 |
| |
989 | 989 |
| |
990 | 990 |
| |
| 991 | + | |
| 992 | + | |
| 993 | + | |
991 | 994 |
| |
992 | 995 |
| |
993 | 996 |
| |
|
0 commit comments
Comments
(0)