Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e033491

Browse files
committed
Improve field order in RangeTblEntry
When perminfoindex was added, it was just added at the end of the block. It would make sense to keep it closer to more related fields. In passing, also add an inline comment, like the other fields have. (Other field reorderings and documentation improvements in RangeTblEntry are being discussed, but it's better not to mix them together.) Discussion: https://www.postgresql.org/message-id/flat/6c1fbccc-85c8-40d3-b08b-4f47f2093711%40eisentraut.org
1 parent 0d3a71d commit e033491

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/backend/nodes/outfuncs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ _outRangeTblEntry(StringInfo str, const RangeTblEntry *node)
505505
WRITE_OID_FIELD(relid);
506506
WRITE_CHAR_FIELD(relkind);
507507
WRITE_INT_FIELD(rellockmode);
508-
WRITE_NODE_FIELD(tablesample);
509508
WRITE_UINT_FIELD(perminfoindex);
509+
WRITE_NODE_FIELD(tablesample);
510510
break;
511511
case RTE_SUBQUERY:
512512
WRITE_NODE_FIELD(subquery);

src/backend/nodes/readfuncs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ _readRangeTblEntry(void)
359359
READ_OID_FIELD(relid);
360360
READ_CHAR_FIELD(relkind);
361361
READ_INT_FIELD(rellockmode);
362-
READ_NODE_FIELD(tablesample);
363362
READ_UINT_FIELD(perminfoindex);
363+
READ_NODE_FIELD(tablesample);
364364
break;
365365
case RTE_SUBQUERY:
366366
READ_NODE_FIELD(subquery);

src/include/catalog/catversion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757
*/
5858

5959
/* yyyymmddN */
60-
#define CATALOG_VERSION_NO 202403051
60+
#define CATALOG_VERSION_NO 202403052
6161

6262
#endif

src/include/nodes/parsenodes.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1072,8 +1072,8 @@ typedef struct RangeTblEntry
10721072
Oid relid; /* OID of the relation */
10731073
char relkind; /* relation kind (see pg_class.relkind) */
10741074
int rellockmode; /* lock level that query requires on the rel */
1075+
Index perminfoindex; /* index of RTEPermissionInfo entry, or 0 */
10751076
struct TableSampleClause *tablesample; /* sampling info, or NULL */
1076-
Index perminfoindex;
10771077

10781078
/*
10791079
* Fields valid for a subquery RTE (else NULL):

0 commit comments

Comments
 (0)