postgresql/src
David Rowley a7f213b11d Fix planner's failure to identify multiple hashable ScalarArrayOpExprs
50e17ad28 (v14) and 29f45e299 (v15) made it so the planner could identify
IN and NOT IN clauses which have Const lists as right-hand arguments and
when an appropriate hash function is available for the data types, mark
the ScalarArrayOpExpr as hashable so the executor could execute it more
optimally by building and probing a hash table during expression
evaluation.

These commits both worked correctly when there was only a single
ScalarArrayOpExpr in the given expression being processed by the
planner, but when there were multiple, only the first was checked and any
subsequent ones were not identified, which resulted in less optimal
expression evaluation during query execution for all but the first found
ScalarArrayOpExpr.

Backpatch to 14, where 50e17ad28 was introduced.

Author: David Geier <geidav.pg@gmail.com>
Discussion: https://postgr.es/m/29a76f51-97b0-4c07-87b7-ec8e3b5345c9@gmail.com
Backpatch-through: 14
2025-04-02 11:58:16 +13:00
..
backend Fix planner's failure to identify multiple hashable ScalarArrayOpExprs 2025-04-02 11:58:16 +13:00
bin pg_amcheck: Fix inconsistency in memory freeing 2025-02-27 14:05:58 +09:00
common Add pg_encoding_set_invalid() 2025-02-10 10:03:39 -05:00
fe_utils In fmtIdEnc(), handle failure of enlargePQExpBuffer(). 2025-02-16 12:46:35 -05:00
include Fix detection and handling of strchrnul() for macOS 15.4. 2025-04-01 16:49:51 -04:00
interfaces Translation updates 2025-02-17 17:51:30 +01:00
makefiles Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
pl Fix plpgsql's handling of simple expressions in scrollable cursors. 2025-03-21 11:30:42 -04:00
port Fix detection and handling of strchrnul() for macOS 15.4. 2025-04-01 16:49:51 -04:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:28:55 -04:00
test Fix MERGE with DO NOTHING actions into a partitioned table. 2025-03-29 09:52:18 +00:00
timezone Update time zone data files to tzdata release 2025a. 2025-01-20 16:49:15 -05:00
tools Fix detection and handling of strchrnul() for macOS 15.4. 2025-04-01 16:49:51 -04:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
nls-global.mk Improve frontend error logging style. 2022-04-08 14:55:14 -04:00