From: | Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix order of parameters in BRIN minmax-multi calls |
Date: | 2021-04-04 17:26:38 |
Message-ID: | E1lT6WE-00040P-4k@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix order of parameters in BRIN minmax-multi calls
The BRIN minmax-multi consistent function incorrectly assumed it can
lookup an operator, and then swap the arguments to get the commutator.
For example <(a,b) would be called as <(b,a) to get >(a,b). This works
when the arguments are of the same type, but with cross-type opclasses
this fails. We can't swap <(float4,float8) arguments, for example.
Fixed by passing arguments in the right order.
Discussion: https://postgr.es/m/CAJKUy5jLZFLCxyxfT%3DMfK5mtPfSzHA1rVLowR-j4RRsFVvKm7A%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1dad2a5ea3d14dd205603c31cc94ec088183ab2a
Modified Files
--------------
src/backend/access/brin/brin_minmax_multi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2021-04-04 17:35:32 | pgsql: Add regression test for minmax-multi macaddr8 type |
Previous Message | Tomas Vondra | 2021-04-04 17:25:09 | pgsql: Fix BRIN minmax-multi distance for inet type |