pgsql: Extract make_SAOP_expr() function from match_orclause_to_indexco

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Extract make_SAOP_expr() function from match_orclause_to_indexco
Date: 2025-04-04 13:17:00
Message-ID: E1u0guq-002dS7-1e@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)rybakina(at)postgrespro(dot)ru>
Author: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Reviewed-by: Ivan Kush <ivan(dot)kush(at)tantorlabs(dot)com>
Reviewed-by: Alexander Korotkov <aekorotkov(at)gmail(dot)com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d48d2e2dc8be50d3ca13305b5699384329b15433

Modified Files
--------------
src/backend/optimizer/path/indxpath.c | 62 +--------------------------
src/backend/optimizer/util/clauses.c | 81 +++++++++++++++++++++++++++++++++++
src/include/optimizer/optimizer.h | 5 +++
3 files changed, 88 insertions(+), 60 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-04-04 14:38:47 pgsql: Re-pgindent pg_largeobject.c after commit 0d6c477664.
Previous Message Peter Eisentraut 2025-04-04 12:46:20 pgsql: Fix crash/valgrind error