mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Make RangeTblEntry dump order consistent
Put the fields alias and eref earlier in the struct, so that it matches the order in _outRangeTblEntry()/_readRangeTblEntry(). This helps 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
This commit is contained in:
@ -494,7 +494,6 @@ _outRangeTblEntry(StringInfo str, const RangeTblEntry *node)
|
|||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("RANGETBLENTRY");
|
WRITE_NODE_TYPE("RANGETBLENTRY");
|
||||||
|
|
||||||
/* put alias + eref first to make dump more legible */
|
|
||||||
WRITE_NODE_FIELD(alias);
|
WRITE_NODE_FIELD(alias);
|
||||||
WRITE_NODE_FIELD(eref);
|
WRITE_NODE_FIELD(eref);
|
||||||
WRITE_ENUM_FIELD(rtekind, RTEKind);
|
WRITE_ENUM_FIELD(rtekind, RTEKind);
|
||||||
|
@ -348,7 +348,6 @@ _readRangeTblEntry(void)
|
|||||||
{
|
{
|
||||||
READ_LOCALS(RangeTblEntry);
|
READ_LOCALS(RangeTblEntry);
|
||||||
|
|
||||||
/* put alias + eref first to make dump more legible */
|
|
||||||
READ_NODE_FIELD(alias);
|
READ_NODE_FIELD(alias);
|
||||||
READ_NODE_FIELD(eref);
|
READ_NODE_FIELD(eref);
|
||||||
READ_ENUM_FIELD(rtekind, RTEKind);
|
READ_ENUM_FIELD(rtekind, RTEKind);
|
||||||
|
@ -57,6 +57,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* yyyymmddN */
|
/* yyyymmddN */
|
||||||
#define CATALOG_VERSION_NO 202403202
|
#define CATALOG_VERSION_NO 202403221
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1027,6 +1027,16 @@ typedef struct RangeTblEntry
|
|||||||
|
|
||||||
NodeTag type;
|
NodeTag type;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fields valid in all RTEs:
|
||||||
|
*
|
||||||
|
* put alias + eref first to make dump more legible
|
||||||
|
*/
|
||||||
|
/* user-written alias clause, if any */
|
||||||
|
Alias *alias pg_node_attr(query_jumble_ignore);
|
||||||
|
/* expanded reference names */
|
||||||
|
Alias *eref pg_node_attr(query_jumble_ignore);
|
||||||
|
|
||||||
RTEKind rtekind; /* see above */
|
RTEKind rtekind; /* see above */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1218,10 +1228,6 @@ typedef struct RangeTblEntry
|
|||||||
/*
|
/*
|
||||||
* Fields valid in all RTEs:
|
* Fields valid in all RTEs:
|
||||||
*/
|
*/
|
||||||
/* user-written alias clause, if any */
|
|
||||||
Alias *alias pg_node_attr(query_jumble_ignore);
|
|
||||||
/* expanded reference names */
|
|
||||||
Alias *eref pg_node_attr(query_jumble_ignore);
|
|
||||||
/* was LATERAL specified? */
|
/* was LATERAL specified? */
|
||||||
bool lateral pg_node_attr(query_jumble_ignore);
|
bool lateral pg_node_attr(query_jumble_ignore);
|
||||||
/* present in FROM clause? */
|
/* present in FROM clause? */
|
||||||
|
Reference in New Issue
Block a user