Skip not SOAP-supported indexes while transforming an OR clause into SAOP
authorAlexander Korotkov <akorotkov@postgresql.org>
Fri, 29 Nov 2024 07:48:29 +0000 (09:48 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Fri, 29 Nov 2024 07:52:12 +0000 (09:52 +0200)
commit5bba0546eecb32f4ff9388815727304823940ef6
treed55b616a3fbcdc92855d6f3d2d6889690157ed87
parentb6612aedc53a6bf069eba5e356a8421ad6426486
Skip not SOAP-supported indexes while transforming an OR clause into SAOP

There is no point in transforming OR-clauses into SAOP's if the target index
doesn't support SAOP scans anyway.  This commit adds corresponding checks
to match_orclause_to_indexcol() and group_similar_or_args().  The first check
fixes the actual bug, while the second just saves some cycles.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/8174de69-9e1a-0827-0e81-ef97f56a5939%40gmail.com
Author: Alena Rybakina
Reviewed-by: Ranier Vilela, Alexander Korotkov, Andrei Lepikhov
src/backend/optimizer/path/indxpath.c
src/test/regress/expected/create_index.out
src/test/regress/sql/create_index.sql