BUG #19524: NaN handling in btree_gist's float4/float8 opclasses

From: Bill Kim <billkimjh(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: BUG #19524: NaN handling in btree_gist's float4/float8 opclasses
Date: 2026-06-28 02:14:35
Message-ID: CAMQXxcgbtD2LXfX0tpgvOizxP-XxrCHV2ZDy4By_TZnJMsxXWQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi all,

I have a patch for this and `make check` passes (core + all contrib, plus
new btree_gist NaN cases covering the three scenarios in the report).
Posting here first in case someone is already further along — if not,
I'll send it to pgsql-hackers and register it in the open CF in a couple
of days.

The fix swaps the five gbt_float{4,8}{gt,ge,eq,le,lt} comparators and
gbt_float{4,8}key_cmp for the NaN-aware float{4,8}_* helpers and
float{4,8}_cmp_internal() from utils/float.h — same total order the
btree opclass already uses. No on-disk change.

Bill

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2026-06-28 09:59:09 Re: BUG #19536: UPDATE RETURNING OLD value is stale after concurrent update when table has a BEFORE UPDATE trigger
Previous Message Bharath Rupireddy 2026-06-27 19:22:14 Re: BUG #19536: UPDATE RETURNING OLD value is stale after concurrent update when table has a BEFORE UPDATE trigger