forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc5dd8ea
committed
More fixes for lossy-GiST-distance-functions patch.
Paul Ramsey reported that commit35fcb1binduced a core dump on commuted ORDER BY expressions, because it wasassuming that the indexorderby expression could be found verbatim in therelevant equivalence class, but it wasn't there. We really don't needanything that complicated anyway; for the data types likely to be used forindex ORDER BY operators in the foreseeable future, the exprType() of theORDER BY expression will serve fine. (The case where we'd have to workharder is where the ORDER BY expression's result is only binary-compatiblewith the declared input type of the ordering operator; long before worryingabout that, one would need to get rid of GiST's hard-wired assumption thatsaid datatype is float8.)Aside from fixing that crash and adding a regression test for the case,I did some desultory code review:nodeIndexscan.c was likewise overthinking how hard it ought to work toidentify the datatype of the ORDER BY expressions.Add comments explaining how come nodeIndexscan.c can get away withsimplifying assumptions about NULLS LAST ordering and no backward scan.Revert no-longer-needed changes of find_ec_member_for_tle(); while thenew definition was no worse than the old, it wasn't better either, andit might cause back-patching pain.Revert entirely bogus additions to genam.h.1 parentd4b538e commitc5dd8ea
File tree
5 files changed
+100
-58
lines changed- src
- backend
- executor
- optimizer/plan
- include/access
- test/regress
- expected
- sql
5 files changed
+100
-58
lines changedLines changed: 33 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
| |||
159 | 160 |
| |
160 | 161 |
| |
161 | 162 |
| |
162 |
| - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
163 | 172 |
| |
164 | 173 |
| |
| 174 | + | |
165 | 175 |
| |
166 | 176 |
| |
167 | 177 |
| |
| |||
370 | 380 |
| |
371 | 381 |
| |
372 | 382 |
| |
373 |
| - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
374 | 388 |
| |
375 | 389 |
| |
376 | 390 |
| |
| |||
388 | 402 |
| |
389 | 403 |
| |
390 | 404 |
| |
391 |
| - | |
| 405 | + | |
392 | 406 |
| |
393 | 407 |
| |
394 | 408 |
| |
| |||
917 | 931 |
| |
918 | 932 |
| |
919 | 933 |
| |
920 |
| - | |
| 934 | + | |
| 935 | + | |
921 | 936 |
| |
922 | 937 |
| |
923 |
| - | |
924 |
| - | |
| 938 | + | |
| 939 | + | |
925 | 940 |
| |
926 | 941 |
| |
927 |
| - | |
| 942 | + | |
| 943 | + | |
928 | 944 |
| |
929 |
| - | |
| 945 | + | |
930 | 946 |
| |
931 |
| - | |
| 947 | + | |
932 | 948 |
| |
933 | 949 |
| |
934 |
| - | |
| 950 | + | |
935 | 951 |
| |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 |
| - | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
940 | 955 |
| |
941 | 956 |
| |
942 | 957 |
| |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 |
| - | |
947 |
| - | |
948 |
| - | |
949 | 958 |
| |
950 | 959 |
| |
951 | 960 |
| |
952 | 961 |
| |
953 | 962 |
| |
954 | 963 |
| |
955 | 964 |
| |
956 |
| - | |
957 |
| - | |
958 |
| - | |
959 |
| - | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
960 | 969 |
| |
961 | 970 |
| |
962 | 971 |
| |
|
Lines changed: 31 additions & 31 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
26 | 25 |
| |
27 | 26 |
| |
28 | 27 |
| |
| |||
172 | 171 |
| |
173 | 172 |
| |
174 | 173 |
| |
175 |
| - | |
176 |
| - | |
| 174 | + | |
| 175 | + | |
177 | 176 |
| |
178 | 177 |
| |
179 | 178 |
| |
| |||
1325 | 1324 |
| |
1326 | 1325 |
| |
1327 | 1326 |
| |
1328 |
| - | |
1329 |
| - | |
| 1327 | + | |
| 1328 | + | |
1330 | 1329 |
| |
1331 |
| - | |
| 1330 | + | |
1332 | 1331 |
| |
1333 | 1332 |
| |
1334 | 1333 |
| |
1335 | 1334 |
| |
1336 | 1335 |
| |
1337 |
| - | |
1338 |
| - | |
1339 |
| - | |
1340 |
| - | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1341 | 1339 |
| |
| 1340 | + | |
1342 | 1341 |
| |
1343 | 1342 |
| |
1344 | 1343 |
| |
1345 |
| - | |
1346 |
| - | |
1347 |
| - | |
1348 |
| - | |
1349 |
| - | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1350 | 1347 |
| |
1351 | 1348 |
| |
1352 |
| - | |
1353 |
| - | |
1354 |
| - | |
1355 |
| - | |
1356 |
| - | |
1357 |
| - | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1358 | 1356 |
| |
1359 | 1357 |
| |
1360 | 1358 |
| |
| |||
4100 | 4098 |
| |
4101 | 4099 |
| |
4102 | 4100 |
| |
4103 |
| - | |
| 4101 | + | |
4104 | 4102 |
| |
4105 | 4103 |
| |
4106 | 4104 |
| |
| |||
4131 | 4129 |
| |
4132 | 4130 |
| |
4133 | 4131 |
| |
4134 |
| - | |
| 4132 | + | |
4135 | 4133 |
| |
4136 | 4134 |
| |
4137 | 4135 |
| |
| |||
4252 | 4250 |
| |
4253 | 4251 |
| |
4254 | 4252 |
| |
4255 |
| - | |
4256 |
| - | |
| 4253 | + | |
| 4254 | + | |
4257 | 4255 |
| |
4258 | 4256 |
| |
4259 | 4257 |
| |
4260 | 4258 |
| |
4261 |
| - | |
4262 |
| - | |
4263 |
| - | |
| 4259 | + | |
| 4260 | + | |
| 4261 | + | |
4264 | 4262 |
| |
| 4263 | + | |
4265 | 4264 |
| |
4266 | 4265 |
| |
4267 | 4266 |
| |
4268 |
| - | |
4269 |
| - | |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
4270 | 4270 |
| |
4271 | 4271 |
| |
4272 | 4272 |
| |
| |||
4292 | 4292 |
| |
4293 | 4293 |
| |
4294 | 4294 |
| |
4295 |
| - | |
| 4295 | + | |
4296 | 4296 |
| |
4297 | 4297 |
| |
4298 | 4298 |
| |
|
Lines changed: 0 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
150 |
| - | |
151 |
| - | |
152 | 150 |
| |
153 |
| - | |
154 | 151 |
| |
155 | 152 |
| |
156 | 153 |
| |
|
Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
89 | 117 |
| |
90 | 118 |
| |
91 | 119 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
64 | 72 |
| |
65 | 73 |
| |
66 | 74 |
| |
|
0 commit comments
Comments
(0)