Use PG 14's hashed ScalarArrayOpExpr path for a non-Const array the planner can prove is fixed for one execution (col = ANY($1), IN ($1,...,$N), $1::int[], string_to_array($1,','), a stable function), not only for a Const array.

Edit
ID 7285
Title Use PG 14's hashed ScalarArrayOpExpr path for a non-Const array the planner can prove is fixed for one execution (col = ANY($1), IN ($1,...,$N), $1::int[], string_to_array($1,','), a stable function), not only for a Const array.
CI (CFBot) Summary
Stats (from CFBot) Patch version: v3, Patch count: 2, First patch: +143−129, All patches: +749−185
Tags Performance
Created 2026-09-09 17:36:58
Last modified 2026-09-09 17:36:58 (1 month ago)
Latest email 2026-10-22 14:53:09 (2 days ago)
Status
PG20-3 (2026-11-01 – 2026-11-30): Needs review
Target version 20
Authors Linden Lance (bestxmg)
Reviewers Become reviewer
Committer
Links
Emails
Hash a ScalarArrayOpExpr whose array is fixed for one execution
First at 2026-09-09 17:18:58 by best xmg <bestxmg at gmail.com>
Latest at 2026-10-22 14:53:09 by David Geier <geidav.pg at gmail.com>
Latest attachment (v3-0001-Refactor-hashed-ScalarArrayOpExpr-evaluation.patch) at 2026-10-19 20:54:46 from best xmg <bestxmg at gmail.com>
    Attachment (v3-0001-Refactor-hashed-ScalarArrayOpExpr-evaluation.patch) at 2026-10-19 20:54:46 from best xmg <bestxmg at gmail.com> (Patch: No)
    Attachment (v2-0001-Refactor-hashed-ScalarArrayOpExpr-evaluation.patch) at 2026-10-10 22:36:49 from best xmg <bestxmg at gmail.com> (Patch: No)
    Attachment (v1-0001-Hash-a-ScalarArrayOpExpr-whose-array-is-fixed-for.patch) at 2026-09-09 17:18:58 from best xmg <bestxmg at gmail.com> (Patch: No)
History
When Who What
2026-09-09 17:36:58 Linden Lance (bestxmg) Attached mail thread TY6PR01MB17327691C30B403369B16B02AF4B02@TY6PR01MB17327.jpnprd01.prod.outlook.com
2026-09-09 17:36:58 Linden Lance (bestxmg) Created patch record
Edit