Extract make_SAOP_expr() function from match_orclause_to_indexcol()
authorAlexander Korotkov <akorotkov@postgresql.org>
Fri, 4 Apr 2025 13:01:28 +0000 (16:01 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Fri, 4 Apr 2025 13:01:28 +0000 (16:01 +0300)
commitd48d2e2dc8be50d3ca13305b5699384329b15433
tree8da1bf32b6d560484bf8869b077c82faabefb221
parentee1ae8b99f964ca1edc038dd558e541832164d52
Extract make_SAOP_expr() function from match_orclause_to_indexcol()

This commit extracts the code to generate ScalarArrayOpExpr on top of the list
of expressions from match_orclause_to_indexcol() into a separate function
make_SAOP_expr().  This function was extracted to be used in optimization for
conversion of 'x IN (VALUES ...)' to 'x = ANY ...'.  make_SAOP_expr() is
placed in clauses.c file as only two additional headers were needed there
compared with other places.

Discussion: https://postgr.es/m/0184212d-1248-4f1f-a42d-f5cb1c1976d2%40tantorlabs.com
Author: Alena Rybakina <a.rybakina@postgrespro.ru>
Author: Andrei Lepikhov <lepihov@gmail.com>
Reviewed-by: Ivan Kush <ivan.kush@tantorlabs.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/util/clauses.c
src/include/optimizer/optimizer.h