forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6fd1dbd
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 parent3895e91 commit6fd1dbd
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 |
| |
| |||
333 | 334 |
| |
334 | 335 |
| |
335 | 336 |
| |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
336 | 343 |
| |
337 | 344 |
| |
338 | 345 |
| |
339 |
| - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
340 | 351 |
| |
341 | 352 |
| |
342 | 353 |
| |
|
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 |
| |
| |||
333 | 334 |
| |
334 | 335 |
| |
335 | 336 |
| |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
342 | 340 |
| |
343 | 341 |
| |
344 | 342 |
| |
345 | 343 |
| |
346 | 344 |
| |
347 |
| - | |
| 345 | + | |
348 | 346 |
| |
349 |
| - | |
| 347 | + | |
350 | 348 |
| |
351 | 349 |
| |
352 | 350 |
| |
|
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 | |
---|---|---|---|
| |||
2192 | 2192 |
| |
2193 | 2193 |
| |
2194 | 2194 |
| |
| 2195 | + | |
2195 | 2196 |
| |
2196 | 2197 |
| |
2197 | 2198 |
| |
2198 | 2199 |
| |
2199 | 2200 |
| |
2200 | 2201 |
| |
2201 | 2202 |
| |
2202 |
| - | |
| 2203 | + | |
2203 | 2204 |
| |
2204 | 2205 |
| |
2205 | 2206 |
| |
|
0 commit comments
Comments
(0)