Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb4080fa

Browse files
committed
Make RangeTblEntry dump order consistent
Put the fields alias and eref earlier in the struct, so that itmatches the order in _outRangeTblEntry()/_readRangeTblEntry(). Thishelps if we ever want to fully automate out/read of RangeTblEntry.Also, it makes dumps in the debugger easier to read in the same way.Internally, this makes no difference.Reviewed-by: Andrew Dunstan <andrew@dunslane.net>Discussion:https://www.postgresql.org/message-id/flat/4b27fc50-8cd6-46f5-ab20-88dbaadca645@eisentraut.org
1 parent367c989 commitb4080fa

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

‎src/backend/nodes/outfuncs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ _outRangeTblEntry(StringInfo str, const RangeTblEntry *node)
494494
{
495495
WRITE_NODE_TYPE("RANGETBLENTRY");
496496

497-
/* put alias + eref first to make dump more legible */
498497
WRITE_NODE_FIELD(alias);
499498
WRITE_NODE_FIELD(eref);
500499
WRITE_ENUM_FIELD(rtekind,RTEKind);

‎src/backend/nodes/readfuncs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ _readRangeTblEntry(void)
348348
{
349349
READ_LOCALS(RangeTblEntry);
350350

351-
/* put alias + eref first to make dump more legible */
352351
READ_NODE_FIELD(alias);
353352
READ_NODE_FIELD(eref);
354353
READ_ENUM_FIELD(rtekind,RTEKind);

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757
*/
5858

5959
/*yyyymmddN */
60-
#defineCATALOG_VERSION_NO202403202
60+
#defineCATALOG_VERSION_NO202403221
6161

6262
#endif

‎src/include/nodes/parsenodes.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,16 @@ typedef struct RangeTblEntry
10271027

10281028
NodeTagtype;
10291029

1030+
/*
1031+
* Fields valid in all RTEs:
1032+
*
1033+
* put alias + eref first to make dump more legible
1034+
*/
1035+
/* user-written alias clause, if any */
1036+
Alias*aliaspg_node_attr(query_jumble_ignore);
1037+
/* expanded reference names */
1038+
Alias*erefpg_node_attr(query_jumble_ignore);
1039+
10301040
RTEKindrtekind;/* see above */
10311041

10321042
/*
@@ -1218,10 +1228,6 @@ typedef struct RangeTblEntry
12181228
/*
12191229
* Fields valid in all RTEs:
12201230
*/
1221-
/* user-written alias clause, if any */
1222-
Alias*aliaspg_node_attr(query_jumble_ignore);
1223-
/* expanded reference names */
1224-
Alias*erefpg_node_attr(query_jumble_ignore);
12251231
/* was LATERAL specified? */
12261232
boollateralpg_node_attr(query_jumble_ignore);
12271233
/* present in FROM clause? */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp