aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayutils.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2023-10-27 17:57:44 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2023-10-27 18:28:37 +0200
commit924e0e2ee058d8dfeae6218dba9419a3ddf1c755 (patch)
tree4f921e77f44ac45a0e2570ea200b4082a750f47a /src/backend/utils/adt/arrayutils.c
parent497fc92086f85ea2ec139b8eab493e750f559ff9 (diff)
downloadpostgresql-924e0e2ee058d8dfeae6218dba9419a3ddf1c755.tar.gz
postgresql-924e0e2ee058d8dfeae6218dba9419a3ddf1c755.zip
Fix minmax-multi distance for extreme interval values
When calculating distance for interval values, the code mostly mimicked interval_mi, i.e. it built a new interval value for the difference. That however does not work for sufficiently distant interval values, when the difference overflows the interval range. Instead, we can calculate the distance directly, without constructing the intermediate (and unnecessary) interval value. Backpatch to 14, where minmax-multi indexes were introduced. Reported-by: Dean Rasheed Reviewed-by: Ashutosh Bapat, Dean Rasheed Backpatch-through: 14 Discussion: https://postgr.es/m/eef0ea8c-4aaa-8d0d-027f-58b1f35dd170@enterprisedb.com
Diffstat (limited to 'src/backend/utils/adt/arrayutils.c')
0 files changed, 0 insertions, 0 deletions