postgresql/contrib/amcheck
Noah Misch 5f27b5f848 Dissociate btequalimage() from interval_ops, ending its deduplication.
Under interval_ops, some equal values are distinguishable.  One such
pair is '24:00:00' and '1 day'.  With that being so, btequalimage()
breaches the documented contract for the "equalimage" btree support
function.  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 such
indexes.  This fix makes interval_ops simply omit the support function,
like numeric_ops does.  Back-pack to v13, where btequalimage() first
appeared.  In back branches, for the benefit of old catalog content,
btequalimage() code will return false for type "interval".  Going
forward, back-branch initdb will include the catalog change.

Reviewed by Peter Geoghegan.

Discussion: https://postgr.es/m/20231011013317.22.nmisch@google.com
2023-10-14 16:33:51 -07:00
..
expected Fix test of pg_stat_io for wal_level=minimal. 2023-07-01 10:00:39 -07:00
sql Fix test of pg_stat_io for wal_level=minimal. 2023-07-01 10:00:39 -07:00
t Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
amcheck--1.0--1.1.sql
amcheck--1.0.sql
amcheck--1.1--1.2.sql
amcheck--1.2--1.3.sql
amcheck.control
Makefile
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
verify_heapam.c Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
verify_nbtree.c Dissociate btequalimage() from interval_ops, ending its deduplication. 2023-10-14 16:33:51 -07:00