postgresql/contrib/intarray
Peter Eisentraut f0d55b68ef 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
2025-08-08 12:10:57 +02:00
..
bench Update copyright for 2022 2022-01-07 19:04:57 -05:00
data Fix integer-overflow problem in intarray's g_int_decompress(). 2024-01-07 15:19:50 -05:00
expected Fix GIN's shimTriConsistentFn to not corrupt its input. 2025-04-12 12:27:46 -04:00
sql Fix GIN's shimTriConsistentFn to not corrupt its input. 2025-04-12 12:27:46 -04:00
.gitignore
_int.h
_int_bool.c Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
_int_gin.c
_int_gist.c Fix integer-overflow problem in intarray's g_int_decompress(). 2024-01-07 15:19:50 -05:00
_int_op.c
_int_selfuncs.c Fix incorrect lack of Datum conversion in _int_matchsel() 2025-08-08 12:10:57 +02:00
_int_tool.c Clean up some code using "(expr) ? true : false" 2021-09-08 09:44:04 +09:00
_intbig_gist.c Remove unnecessary pfree() in g_intbig_compress(). 2023-07-13 13:08:17 -04:00
intarray--1.0--1.1.sql
intarray--1.1--1.2.sql
intarray--1.2--1.3.sql
intarray--1.2.sql
intarray--1.3--1.4.sql
intarray--1.4--1.5.sql Remove deprecated containment operators for contrib types. 2021-03-05 10:45:41 -05:00
intarray.control Remove deprecated containment operators for contrib types. 2021-03-05 10:45:41 -05:00
Makefile Remove deprecated containment operators for contrib types. 2021-03-05 10:45:41 -05:00