forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbf1c21c
committed
Dissociate btequalimage() from interval_ops, ending its deduplication.
Under interval_ops, some equal values are distinguishable. One suchpair is '24:00:00' and '1 day'. With that being so, btequalimage()breaches the documented contract for the "equalimage" btree supportfunction. This can cause incorrect results from index-only scans.Users should REINDEX any btree indexes having interval-type columns.After updating, pg_amcheck will report an error for almost all suchindexes. This fix makes interval_ops simply omit the support function,like numeric_ops does. Back-pack to v13, where btequalimage() firstappeared. In back branches, for the benefit of old catalog content,btequalimage() code will return false for type "interval". Goingforward, back-branch initdb will include the catalog change.Reviewed by Peter Geoghegan.Discussion:https://postgr.es/m/20231011013317.22.nmisch@google.com1 parent06ff064 commitbf1c21c
File tree
5 files changed
+21
-13
lines changed- contrib/amcheck
- src
- backend/utils/adt
- include/catalog
- test/regress/expected
5 files changed
+21
-13
lines changedLines changed: 12 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
| |||
338 | 339 |
| |
339 | 340 |
| |
340 | 341 |
| |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
341 | 348 |
| |
342 | 349 |
| |
343 | 350 |
| |
344 |
| - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
345 | 356 |
| |
346 | 357 |
| |
347 | 358 |
| |
|
Lines changed: 6 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
385 | 386 |
| |
386 | 387 |
| |
387 | 388 |
| |
388 |
| - | |
389 |
| - | |
390 |
| - | |
391 |
| - | |
392 |
| - | |
393 |
| - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
394 | 392 |
| |
395 | 393 |
| |
396 | 394 |
| |
397 | 395 |
| |
398 | 396 |
| |
399 |
| - | |
| 397 | + | |
400 | 398 |
| |
401 |
| - | |
| 399 | + | |
402 | 400 |
| |
403 | 401 |
| |
404 | 402 |
| |
|
Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
175 |
| - | |
176 |
| - | |
177 | 175 |
| |
178 | 176 |
| |
179 | 177 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
| 53 | + | |
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2208 | 2208 |
| |
2209 | 2209 |
| |
2210 | 2210 |
| |
| 2211 | + | |
2211 | 2212 |
| |
2212 | 2213 |
| |
2213 | 2214 |
| |
| |||
2216 | 2217 |
| |
2217 | 2218 |
| |
2218 | 2219 |
| |
2219 |
| - | |
| 2220 | + | |
2220 | 2221 |
| |
2221 | 2222 |
| |
2222 | 2223 |
| |
|
0 commit comments
Comments
(0)