git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 55873a0) | patch
Fix BRIN minmax-multi distance for interval type
Sun, 4 Apr 2021 17:13:26 +0000 (19:13 +0200)
Sun, 4 Apr 2021 17:19:51 +0000 (19:19 +0200)
commit 2b10e0e3c2ca14d732521479123e5d5e2094e143
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
src/backend/access/brin/brin_minmax_multi.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /