forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcb37c29
committed
Fix index matching for operators with mixed collatable/noncollatable inputs.
If an indexable operator for a non-collatable indexed datatype has acollatable right-hand input type, any OpExpr for it will be marked with anonzero inputcollid (since having one collatable input is sufficient tomake that happen). However, an index on a non-collatable column certainlydoesn't have any collation. This caused us to fail to match such operatorsto their indexes, because indxpath.c required an exact match of indexcollation and clause collation. It seems correct to allow a match when theindex is collation-less regardless of the clause's inputcollid: an operatorwith both noncollatable and collatable inputs could perhaps depend on thecollation of the collatable input, but it could hardly expect the index forthe noncollatable input to have that same collation.Per bug #6232 from Pierre Ducroquet. His example is specifically about"hstore ? text" but the problem seems quite generic.1 parent5e59584 commitcb37c29
1 file changed
+18
-7
lines changedLines changed: 18 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 |
| |
45 | 48 |
| |
46 | 49 |
| |
| |||
1181 | 1184 |
| |
1182 | 1185 |
| |
1183 | 1186 |
| |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1184 | 1194 |
| |
1185 | 1195 |
| |
1186 | 1196 |
| |
| |||
1303 | 1313 |
| |
1304 | 1314 |
| |
1305 | 1315 |
| |
1306 |
| - | |
| 1316 | + | |
1307 | 1317 |
| |
1308 | 1318 |
| |
1309 | 1319 |
| |
| |||
1322 | 1332 |
| |
1323 | 1333 |
| |
1324 | 1334 |
| |
1325 |
| - | |
| 1335 | + | |
1326 | 1336 |
| |
1327 | 1337 |
| |
1328 | 1338 |
| |
| |||
1398 | 1408 |
| |
1399 | 1409 |
| |
1400 | 1410 |
| |
1401 |
| - | |
1402 |
| - | |
| 1411 | + | |
| 1412 | + | |
1403 | 1413 |
| |
1404 | 1414 |
| |
1405 | 1415 |
| |
| |||
1571 | 1581 |
| |
1572 | 1582 |
| |
1573 | 1583 |
| |
1574 |
| - | |
| 1584 | + | |
1575 | 1585 |
| |
1576 | 1586 |
| |
1577 | 1587 |
| |
| |||
1862 | 1872 |
| |
1863 | 1873 |
| |
1864 | 1874 |
| |
1865 |
| - | |
| 1875 | + | |
1866 | 1876 |
| |
1867 | 1877 |
| |
1868 | 1878 |
| |
| |||
2967 | 2977 |
| |
2968 | 2978 |
| |
2969 | 2979 |
| |
2970 |
| - | |
| 2980 | + | |
| 2981 | + | |
2971 | 2982 |
| |
2972 | 2983 |
| |
2973 | 2984 |
| |
|
0 commit comments
Comments
(0)