git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f3e4aeb)
Revise the header comment for match_clause_to_indexcol()
Tue, 4 Feb 2025 21:18:47 +0000 (23:18 +0200)
Tue, 4 Feb 2025 21:18:47 +0000 (23:18 +0200)
Since d4378c0005e6, match_clause_to_indexcol() doesn't always return NULL
for an OR clause. This commit reflects that in the function header comment.

Reported-by: Pavel Borisov <pashkin.elfe@gmail.com>

diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index fa3edf60f3cf14f18cc6cf1a4a1051654e2f02e4..a58cf5bad1a5ed937f2af3de5c787ca1a952d7f0 100644 (file)
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -2639,8 +2639,9 @@ match_clause_to_index(PlannerInfo *root,
* Returns an IndexClause if the clause can be used with this index key,
* or NULL if not.
*
- * NOTE: returns NULL if clause is an OR or AND clause; it is the
- * responsibility of higher-level routines to cope with those.
+ * NOTE: This routine always returns NULL if the clause is an AND clause.
+ * Higher-level routines deal with OR and AND clauses. OR clause can be
+ * matched as a whole by match_orclause_to_indexcol() though.
*/
static IndexClause *
match_clause_to_indexcol(PlannerInfo *root,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /