forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit15d4859
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 parent74a1bb1 commit15d4859
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1003 | 1003 |
| |
1004 | 1004 |
| |
1005 | 1005 |
| |
1006 |
| - | |
| 1006 | + | |
1007 | 1007 |
| |
1008 | 1008 |
| |
1009 | 1009 |
| |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
1010 | 1013 |
| |
1011 | 1014 |
| |
1012 | 1015 |
| |
|
0 commit comments
Comments
(0)