Fix typo in comment of match_orclause_to_indexcol()

Started by Tender Wang4 months ago4 messages
#1Tender Wang
tndrwang@gmail.com
1 attachment(s)

Hi,

While debugging the optimizer codes, I found a typo
in match_orclause_to_indexcol():

/*
* Try to convert a list of OR-clauses to a single SAOP expression. Each
* OR entry must be in the form: (indexkey operator constant) or (constant
* operator indexkey). Operators of all the entries must match. To be
* effective, give up on the first non-matching entry. Exit is
* implemented as a break from the loop, which is catched afterwards.
*/

"catched" should be "caught".

The attached patch fixes it.

--
Thanks,
Tender Wang

Attachments:

0001-Fix-a-typo-in-the-comment.patchapplication/octet-stream; name=0001-Fix-a-typo-in-the-comment.patchDownload
From 7f9614bdd86066c16d02c640e0d52f1263d77cef Mon Sep 17 00:00:00 2001
From: Tender Wang <tndrwang@gmail.com>
Date: Fri, 19 Sep 2025 18:40:30 +0800
Subject: [PATCH] Fix a typo in the comment.

---
 src/backend/optimizer/path/indxpath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 4f5c98f0091..a0e20e93257 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -3324,7 +3324,7 @@ match_orclause_to_indexcol(PlannerInfo *root,
 	 * OR entry must be in the form: (indexkey operator constant) or (constant
 	 * operator indexkey).  Operators of all the entries must match.  To be
 	 * effective, give up on the first non-matching entry.  Exit is
-	 * implemented as a break from the loop, which is catched afterwards.
+	 * implemented as a break from the loop, which is caught afterwards.
 	 */
 	foreach(lc, orclause->args)
 	{
-- 
2.34.1

#2David Rowley
dgrowleyml@gmail.com
In reply to: Tender Wang (#1)
Re: Fix typo in comment of match_orclause_to_indexcol()

On Fri, 19 Sept 2025 at 22:48, Tender Wang <tndrwang@gmail.com> wrote:

/*
* Try to convert a list of OR-clauses to a single SAOP expression. Each
* OR entry must be in the form: (indexkey operator constant) or (constant
* operator indexkey). Operators of all the entries must match. To be
* effective, give up on the first non-matching entry. Exit is
* implemented as a break from the loop, which is catched afterwards.
*/

"catched" should be "caught".

Thanks. I'll handle this.

David

#3David Rowley
dgrowleyml@gmail.com
In reply to: David Rowley (#2)
Re: Fix typo in comment of match_orclause_to_indexcol()

On Fri, 19 Sept 2025 at 23:14, David Rowley <dgrowleyml@gmail.com> wrote:

On Fri, 19 Sept 2025 at 22:48, Tender Wang <tndrwang@gmail.com> wrote:

"catched" should be "caught".

Thanks. I'll handle this.

I ended up doing a bit more rewording in this area. I wasn't quite
sure if I understood the "to be effective" terminology. I suspect this
means efficiency, so I ended up changing a bit more than just the
typo.

David

#4Tender Wang
tndrwang@gmail.com
In reply to: David Rowley (#3)
Re: Fix typo in comment of match_orclause_to_indexcol()

David Rowley <dgrowleyml@gmail.com> 于2025年9月19日周五 19:38写道:

On Fri, 19 Sept 2025 at 23:14, David Rowley <dgrowleyml@gmail.com> wrote:

On Fri, 19 Sept 2025 at 22:48, Tender Wang <tndrwang@gmail.com> wrote:

"catched" should be "caught".

Thanks. I'll handle this.

I ended up doing a bit more rewording in this area. I wasn't quite
sure if I understood the "to be effective" terminology. I suspect this
means efficiency, so I ended up changing a bit more than just the
typo.

David

Thanks for pushing.

--
Thanks,
Tender Wang