On 11/2/26 23:49, Tomas Vondra wrote: > On 10/31/26 05:11, shihao zhong wrote: >> 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. I've pushed the three BRIN fixes. Here's an updated fix for the > multirange issue, with the -infinity for (v1 < v2). >
I've pushed the remaining part, with some minor tweaks (mostly wording, stale comments, and so on). I realized this may actually affect more places, including inserts into GiST indexes, selectivity estimation, etc. Hence the minor tweaks in the commit message. I have tried to construct a test exercising the -infinity case, but that turned out a bit ugly. It either depended on platform (formatting of "infinity"), or triggered it through GiST page splits etc. I decided it's not worth it, so we test just the +infinity case. Thanks for the investigation and patches! -- Tomas Vondra may the buildfarm be merciful
