forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita359d37
Simplify and generalize PrepareSortSupportFromIndexRel()
PrepareSortSupportFromIndexRel() was accepting btree strategy numberspurely for the purpose of comparing it later against btree strategiesto determine if the sort direction was forward or reverse. Changethat. Instead, pass a bool directly, to indicate the same without anunfortunate assumption that a strategy number refers specifically to abtree strategy. (This is similar in spirit to commits0d2aa4d andc594f1a.)(This could arguably be simplfied further by having the callers fillin ssup_reverse directly. But this way, it preserves consistency byhaving all PrepareSortSupport*() variants be responsible for fillingin ssup_reverse.)Moreover, remove the hardcoded check against BTREE_AM_OID, and checkagainst amcanorder instead, which is the actual requirement.Co-authored-by: Mark Dilger <mark.dilger@enterprisedb.com>Discussion:https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com1 parent1548c3a commita359d37
File tree
4 files changed
+16
-22
lines changed- src
- backend
- access/nbtree
- utils/sort
- include/utils
4 files changed
+16
-22
lines changedLines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1171 | 1171 |
| |
1172 | 1172 |
| |
1173 | 1173 |
| |
1174 |
| - | |
| 1174 | + | |
1175 | 1175 |
| |
1176 | 1176 |
| |
1177 | 1177 |
| |
| |||
1183 | 1183 |
| |
1184 | 1184 |
| |
1185 | 1185 |
| |
1186 |
| - | |
1187 |
| - | |
| 1186 | + | |
1188 | 1187 |
| |
1189 |
| - | |
| 1188 | + | |
1190 | 1189 |
| |
1191 | 1190 |
| |
1192 | 1191 |
| |
|
Lines changed: 6 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 |
| - | |
| 153 | + | |
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
157 |
| - | |
| 157 | + | |
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
161 |
| - | |
| 161 | + | |
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 |
| - | |
170 |
| - | |
171 |
| - | |
172 |
| - | |
173 |
| - | |
174 |
| - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
175 | 172 |
| |
176 | 173 |
| |
177 | 174 |
| |
|
Lines changed: 6 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
329 | 329 |
| |
330 | 330 |
| |
331 | 331 |
| |
332 |
| - | |
| 332 | + | |
333 | 333 |
| |
334 | 334 |
| |
335 | 335 |
| |
| |||
341 | 341 |
| |
342 | 342 |
| |
343 | 343 |
| |
344 |
| - | |
345 |
| - | |
| 344 | + | |
346 | 345 |
| |
347 |
| - | |
| 346 | + | |
348 | 347 |
| |
349 | 348 |
| |
350 | 349 |
| |
| |||
412 | 411 |
| |
413 | 412 |
| |
414 | 413 |
| |
415 |
| - | |
| 414 | + | |
416 | 415 |
| |
417 | 416 |
| |
418 | 417 |
| |
| |||
424 | 423 |
| |
425 | 424 |
| |
426 | 425 |
| |
427 |
| - | |
428 |
| - | |
| 426 | + | |
429 | 427 |
| |
430 |
| - | |
| 428 | + | |
431 | 429 |
| |
432 | 430 |
| |
433 | 431 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
387 |
| - | |
| 387 | + | |
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
|
0 commit comments
Comments
(0)