postgres/contrib/intarray
Peter Eisentraut fd2ab03fea 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:06:06 +02:00
..
bench Update copyright for 2025 2025-01-01 11:21:55 -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:28:02 -04:00
sql Fix GIN's shimTriConsistentFn to not corrupt its input. 2025-04-12 12:28:02 -04:00
_int_bool.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
_int_gin.c Make the order of the header file includes consistent in contrib modules. 2019-10-24 08:05:34 +05:30
_int_gist.c Fix integer-overflow problem in intarray's g_int_decompress(). 2024-01-07 15:19:50 -05:00
_int_op.c Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
_int_selfuncs.c Fix incorrect lack of Datum conversion in _int_matchsel() 2025-08-08 12:06:06 +02:00
_int_tool.c Specialize intarray sorting 2025-02-18 11:04:55 +07:00
_int.h Specialize intarray sorting 2025-02-18 11:04:55 +07:00
_intbig_gist.c Use new overflow-safe integer comparison functions. 2024-02-16 14:05:36 -06:00
.gitignore
intarray--1.1--1.2.sql Make contrib modules' installation scripts more secure. 2020-08-10 10:44:42 -04:00
intarray--1.2--1.3.sql Implement operator class parameters 2020-03-30 19:17:23 +03:00
intarray--1.2.sql Update extensions with GIN/GIST support for parallel query. 2016-06-14 13:34:37 -04:00
intarray--1.3--1.4.sql Remove <@ from contrib/intarray's GiST operator classes. 2020-08-08 17:26:29 -04:00
intarray--1.4--1.5.sql Remove deprecated containment operators for contrib types. 2021-03-05 10:45:41 -05:00
intarray--1.0--1.1.sql
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
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00