🌐 AI搜索 & 代理 主页
Skip to content

Commit 6fa2688

Browse files
committed
Improve wording in a few comments
Initially this was to fix the "catched" typo, but I (David) wasn't quite clear on what the previous comment meant about being "effective". I expect this means efficiency, so I've reworded the comment to indicate that. While this is only a comment fixup, for the sake of possibly minimizing possible future backpatching pain, I've opted to backpatch to 18 since this code is new to that version and the release isn't out the door yet. Author: Tender Wang <tndrwang@gmail.com> Discussion: https://postgr.es/m/CAHewXNmSYWPud1sfBvpKbCJeRkWeZYuqatxtV9U9LvAFXBEiBw@mail.gmail.com Backpatch-through: 18
1 parent 9a82a64 commit 6fa2688

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/backend/optimizer/path/indxpath.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3322,9 +3322,9 @@ match_orclause_to_indexcol(PlannerInfo *root,
33223322
/*
33233323
* Try to convert a list of OR-clauses to a single SAOP expression. Each
33243324
* OR entry must be in the form: (indexkey operator constant) or (constant
3325-
* operator indexkey). Operators of all the entries must match. To be
3326-
* effective, give up on the first non-matching entry. Exit is
3327-
* implemented as a break from the loop, which is catched afterwards.
3325+
* operator indexkey). Operators of all the entries must match. On
3326+
* discovery of anything unsupported, we give up by breaking out of the
3327+
* loop immediately and returning NULL.
33283328
*/
33293329
foreach(lc, orclause->args)
33303330
{
@@ -3462,9 +3462,9 @@ match_orclause_to_indexcol(PlannerInfo *root,
34623462
}
34633463

34643464
/*
3465-
* Catch the break from the loop above. Normally, a foreach() loop ends
3466-
* up with a NULL list cell. A non-NULL list cell indicates a break from
3467-
* the foreach() loop. Free the consts list and return NULL then.
3465+
* Handle failed conversion from breaking out of the loop because of an
3466+
* unsupported qual. Free the consts list and return NULL to indicate the
3467+
* conversion failed.
34683468
*/
34693469
if (lc != NULL)
34703470
{

0 commit comments

Comments
 (0)