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: v5, Patch count: 2, First patch: +143−129, All patches: +767−202
Tags Performance
Created 2026-09-09 17:36:58
Last modified 2026-09-09 17:36:58 (1 month ago)
Latest email 2026-11-01 20:07:53 (1 hour ago)
Status
PG20-3 (2026-11-01 – 2026-11-30): Needs review
Target version 20
Authors Linden Lance (bestxmg)
Reviewers Ayoub Kazar (kaz) 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-11-01 20:07:53 by best xmg <bestxmg at gmail.com>
Latest attachment (v5-0001-Refactor-hashed-ScalarArrayOpExpr-evaluation.patch) at 2026-11-01 20:07:53 from best xmg <bestxmg at gmail.com>
    Attachment (v5-0001-Refactor-hashed-ScalarArrayOpExpr-evaluation.patch) at 2026-11-01 20:07:53 from best xmg <bestxmg at gmail.com> (Patch: No)
    Attachment (non-strict-reprod.sql) at 2026-10-30 17:56:51 from Ayoub Kazar <ayoub.kazar at data-bene.io> (Patch: No)
    Attachment (v4-0002-Hash-a-ScalarArrayOpExpr-whose-array-is-fixed-for.patch) at 2026-10-26 10:29:22 from best xmg <bestxmg at gmail.com> (Patch: No)
    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-11-01 20:21:05 Ayoub Kazar (kaz) Added kaz as reviewer
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