pgsql: Fix BRIN minmax-multi distance for timetz type

From: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix BRIN minmax-multi distance for timetz type
Date: 2021-04-04 17:23:23
Message-ID: E1lT6T5-0003yb-4I@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix BRIN minmax-multi distance for timetz type

The distance calculation ignored the time zone, so the result of (b-a)
might have ended negative even if (b > a). Fixed by considering the time
zone difference.

Reported-by: Jaime Casanova
Discussion: https://postgr.es/m/CAJKUy5jLZFLCxyxfT%3DMfK5mtPfSzHA1rVLowR-j4RRsFVvKm7A%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7262f2421a1e099a631356f7b80ad198e34e2a8a

Modified Files
--------------
src/backend/access/brin/brin_minmax_multi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2021-04-04 17:25:09 pgsql: Fix BRIN minmax-multi distance for inet type
Previous Message Tomas Vondra 2021-04-04 17:21:28 pgsql: Fix BRIN minmax-multi distance for interval type