Simplify relation_has_unique_index_for()
authorRichard Guo <rguo@postgresql.org>
Tue, 19 Aug 2025 00:37:04 +0000 (09:37 +0900)
committerRichard Guo <rguo@postgresql.org>
Tue, 19 Aug 2025 00:37:04 +0000 (09:37 +0900)
commitbf9ee294e567654231c5b2fef09b8a5367907366
treecd402bb897bc06159a16146b80d58364cf461cdf
parent24225ad9aafc576295e210026d8ffa9f50d61145
Simplify relation_has_unique_index_for()

Now that the only call to relation_has_unique_index_for() that
supplied an exprlist and oprlist has been removed, the loop handling
those lists is effectively dead code.  This patch removes that loop
and simplifies the function accordingly.

Author: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs4-EBnaRvEs7frTLbsXiweSTUXifsteF-d3rvv01FKO86w@mail.gmail.com
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/plan/analyzejoins.c
src/include/optimizer/paths.h