forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0834df9
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 parent0df88a6 commit0834df9
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 |
| |
| |||
336 | 337 |
| |
337 | 338 |
| |
338 | 339 |
| |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
339 | 346 |
| |
340 | 347 |
| |
341 | 348 |
| |
342 |
| - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
343 | 354 |
| |
344 | 355 |
| |
345 | 356 |
| |
|
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 | |
---|---|---|---|
| |||
2174 | 2174 |
| |
2175 | 2175 |
| |
2176 | 2176 |
| |
| 2177 | + | |
2177 | 2178 |
| |
2178 | 2179 |
| |
2179 | 2180 |
| |
| |||
2182 | 2183 |
| |
2183 | 2184 |
| |
2184 | 2185 |
| |
2185 |
| - | |
| 2186 | + | |
2186 | 2187 |
| |
2187 | 2188 |
| |
2188 | 2189 |
| |
|
0 commit comments
Comments
(0)