aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/network_gist.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2021-04-04 19:13:26 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2021-04-04 19:19:51 +0200
commit2b10e0e3c2ca14d732521479123e5d5e2094e143 (patch)
tree4903e8ea7183fb8e75dafa4eb8d25d0e4b2c4989 /src/backend/utils/adt/network_gist.c
parent55873a00e3c3349664e7215077dca74ccea08b4d (diff)
downloadpostgresql-2b10e0e3c2ca14d732521479123e5d5e2094e143.tar.gz
postgresql-2b10e0e3c2ca14d732521479123e5d5e2094e143.zip
Fix BRIN minmax-multi distance for interval type
The distance calculation for interval type was treating months as having 31 days, which is inconsistent with the interval comparator (using 30 days). Due to this it was possible to get negative distance (b-a) when (a<b), trigerring an assert. Fixed by adopting the same logic as interval_cmp_value. Reported-by: Jaime Casanova Discussion: https://postgr.es/m/CAJKUy5jKH0Xhneau2mNftNPtTy-BVgQfXc8zQkEvRvBHfeUThQ%40mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/network_gist.c')
0 files changed, 0 insertions, 0 deletions