Extract make_SAOP_expr() function from match_orclause_to_indexcol()
Alexander Korotkov <akorotkov@postgresql.org>
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>
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/indxpath.c | modified | +2 −60 |
| src/backend/optimizer/util/clauses.c | modified | +81 −0 |
| src/include/optimizer/optimizer.h | modified | +5 −0 |
Discussion
- Replace IN VALUES with ANY in WHERE clauses during optimization 39 messages · 2024-10-03 → 2025-04-04