pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix incorrect lack of Datum conversion in _int_matchsel()
Date: Fri, 08 Aug 2025 10:17:03 +0000
Message-ID: <E1ukK9n-001N3O-06@gemulon.postgresql.org> (raw)
Fix incorrect lack of Datum conversion in _int_matchsel()
The code used
return (Selectivity) 0.0;
where
PG_RETURN_FLOAT8(0.0);
would be correct.
On 64-bit systems, these are pretty much equivalent, but on 32-bit
systems, PG_RETURN_FLOAT8() correctly produces a pointer, but the old
wrong code would return a null pointer, possibly leading to a crash
elsewhere.
We think this code is actually not reachable because bqarr_in won't
accept an empty query, and there is no other function that will
create query_int values. But better be safe and not let such
incorrect code lie around.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/8246d7ff-f4b7-4363-913e-827dadfeb145%40eisentraut.org
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/992a18f5161cf36147eedaf7ac1d0af8a89646dc
Modified Files
--------------
contrib/intarray/_int_selfuncs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
view thread (7+ messages) latest in thread
Message-ID: <E1ukK9n-001N3O-06@gemulon.postgresql.org> Permalink: ../E1ukK9n-001N3O-06@gemulon.postgresql.org/ Also on: postgresql.org/message-id/E1ukK9n-001N3O-06@gemulon.postgresql.org ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-committers@postgresql.org Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix incorrect lack of Datum conversion in _int_matchsel() In-Reply-To: <E1ukK9n-001N3O-06@gemulon.postgresql.org> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox