summaryrefslogtreecommitdiff
path: root/src/include/nodes/parsenodes.h
diff options
context:
space:
mode:
authorPeter Eisentraut2024-03-22 06:12:28 +0000
committerPeter Eisentraut2024-03-22 06:28:33 +0000
commitb4080fa3dcf6c6359e542169e0e81a0662c53ba8 (patch)
treec6914dc70d21e6bf0ca595ff6c9d1d4305f0ea99 /src/include/nodes/parsenodes.h
parent367c989cd8405663bb9a35ec1aa4f79b673a55ff (diff)
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 <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r--src/include/nodes/parsenodes.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 1ea3b8f0b10..298a6828331 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -1027,6 +1027,16 @@ typedef struct RangeTblEntry
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 */
/*
@@ -1218,10 +1228,6 @@ typedef struct RangeTblEntry
/*
* 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? */
bool lateral pg_node_attr(query_jumble_ignore);
/* present in FROM clause? */