pgsql: Prevent satisfies_hash_partition from crashing with VARIADIC NUL

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Prevent satisfies_hash_partition from crashing with VARIADIC NUL
Date: 2026-07-06 17:04:31
Message-ID: E1wgmkB-001cLB-1L@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prevent satisfies_hash_partition from crashing with VARIADIC NULL.

Commit f3b0897a1213f46b4d3a99a7f8ef3a4b32e03572 fixed some
related problems, but overlooked this one. That commit first
appeared in PostgreSQL 11, so back-patch to all supported branches.

Backpatch-through: 14
Discussion: http://postgr.es/m/CA+TgmobsvQw3F+KRYT83=N3teh8D2t-oPR=U06QDZJE3viCJRg@mail.gmail.com
Reviewed-by: Tender Wang <tndrwang(at)gmail(dot)com>
Reviewed-by: Ewan Young <kdbase(dot)hack(at)gmail(dot)com>

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0c06ebf126a0d5df39d9c4298193d9887443ce93

Modified Files
--------------
src/backend/partitioning/partbounds.c | 14 +++++++++++++-
src/test/regress/expected/hash_part.out | 7 +++++++
src/test/regress/sql/hash_part.sql | 3 +++
3 files changed, 23 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-07-06 17:06:45 pgsql: Fix LIKE/regex optimization for indexscan with exact-match patte
Previous Message Nathan Bossart 2026-07-06 16:40:43 pgsql: Remove switch statements in vector8_shift_{left,right}.