Re: Fix BRIN numeric_minmax_multi_ops out of range value range merging

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix BRIN numeric_minmax_multi_ops out of range value range merging
Date: 2026-10-31 04:11:17
Message-ID: CAGRkXqS7Qyn_U_L3N5dmDjyE2qT8xKZBzgkUeKdR8i=X50NEYw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tomas,

Thanks for your patch..

I think your code is right, the subtraction only fails when the result is
too
big for numeric.

Two small things.

1. A NaN boundary gives a NaN distance. The
brin_minmax_multi_distance_numeric
return infinity there.

2. In 0004, GiST can call numrange_subdiff with v1 < v2. Overflow
there should give -infinity, not +infinity.

Thanks,
Shihao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-10-31 04:16:59 Re: [PG19] Bogus errors for polymorphic plpython functions
Previous Message Mahendrakar Srinivasarao 2026-10-31 03:47:29 [PATCH] doc: Fix description of relative extension "directory" setting