[PATCH] Correct RangeTblEntry.join_using_alias comment to reflect field order

Started by Steve Lau4 months ago5 messages
#1Steve Lau
stevelauc@outlook.com
1 attachment(s)

Hi hackers!

Found a tiny incorrect comment of RangeTblEntry, field "alias" is actually above "join_using_alias", so the code comment could be updated to reflect the current field order:

join_using_alias is an alias clause attached directly to JOIN/USING. It is different from the alias field (below) in that it does not hide the

Regards,
steve

Attachments:

v1-0001-Correct-RangeTblEntry.join_using_alias-comment-to-re.patchapplication/octet-streamDownload
From 285ed64e61efb56e72349dd70018e4ca259c8095 Mon Sep 17 00:00:00 2001
From: Steve Lau <stevelauc@outlook.com>
Date: Sun, 21 Sep 2025 22:22:27 +0800
Subject: [PATCH] Correct RangeTblEntry.join_using_alias comment to reflect
 field order

> join_using_alias is an alias clause attached directly to JOIN/USING. It
> is different from the alias field **(below)** in that it does not hide the

Currently, field "alias" is actually above the "join_using_alias" field,
so this comment could be updated.
---
 src/include/nodes/parsenodes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 86a236bd58b..4ed14fc5b78 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -1189,7 +1189,7 @@ typedef struct RangeTblEntry
 
 	/*
 	 * join_using_alias is an alias clause attached directly to JOIN/USING. It
-	 * is different from the alias field (below) in that it does not hide the
+	 * is different from the alias field (above) in that it does not hide the
 	 * range variables of the tables being joined.
 	 */
 	Alias	   *join_using_alias pg_node_attr(query_jumble_ignore);
-- 
2.50.1

#2Chao Li
li.evan.chao@gmail.com
In reply to: Steve Lau (#1)
Re: [PATCH] Correct RangeTblEntry.join_using_alias comment to reflect field order

On Sep 21, 2025, at 22:48, Steve Lau <stevelauc@outlook.com> wrote:

Hi hackers!

Found a tiny incorrect comment of RangeTblEntry, field "alias" is actually above "join_using_alias", so the code comment could be updated to reflect the current field order:

join_using_alias is an alias clause attached directly to JOIN/USING. It is different from the alias field (below) in that it does not hide the

Regards,
steve

<v1-0001-Correct-RangeTblEntry.join_using_alias-comment-to-re.patch>

“alias” is the second field of structure RangeTblEntry, so it should be above “join_using_alias”.

The change looks good to me.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

#3Richard Guo
guofenglinux@gmail.com
In reply to: Steve Lau (#1)
Re: [PATCH] Correct RangeTblEntry.join_using_alias comment to reflect field order

On Sun, Sep 21, 2025 at 11:54 PM Steve Lau <stevelauc@outlook.com> wrote:

Found a tiny incorrect comment of RangeTblEntry, field "alias" is actually above "join_using_alias", so the code comment could be updated to reflect the current field order:

join_using_alias is an alias clause attached directly to JOIN/USING. It is different from the alias field (below) in that it does not hide the

Nice catch. Will push the patch.

- Richard

#4David Rowley
dgrowleyml@gmail.com
In reply to: Richard Guo (#3)
Re: [PATCH] Correct RangeTblEntry.join_using_alias comment to reflect field order

On Mon, 22 Sept 2025 at 11:56, Richard Guo <guofenglinux@gmail.com> wrote:

On Sun, Sep 21, 2025 at 11:54 PM Steve Lau <stevelauc@outlook.com> wrote:

Found a tiny incorrect comment of RangeTblEntry, field "alias" is actually above "join_using_alias", so the code comment could be updated to reflect the current field order:

join_using_alias is an alias clause attached directly to JOIN/USING. It is different from the alias field (below) in that it does not hide the

Nice catch. Will push the patch.

I was just working on a script to find others and it highlighted a
bunch more. Do you still want to do this one, or should I take them
all in one fell swoop?

David

#5David Rowley
dgrowleyml@gmail.com
In reply to: David Rowley (#4)
Re: [PATCH] Correct RangeTblEntry.join_using_alias comment to reflect field order

On Mon, 22 Sept 2025 at 12:49, David Rowley <dgrowleyml@gmail.com> wrote:

On Mon, 22 Sept 2025 at 11:56, Richard Guo <guofenglinux@gmail.com> wrote:

Nice catch. Will push the patch.

I was just working on a script to find others and it highlighted a
bunch more. Do you still want to do this one, or should I take them
all in one fell swoop?

Please disregard the above. Wrong thread.

David