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
WRITE_OID_FIELD(relid);
WRITE_CHAR_FIELD(relkind);
WRITE_INT_FIELD(rellockmode);
- WRITE_NODE_FIELD(tablesample);
WRITE_UINT_FIELD(perminfoindex);
+ WRITE_NODE_FIELD(tablesample);
break;
case RTE_SUBQUERY:
WRITE_NODE_FIELD(subquery);
READ_OID_FIELD(relid);
READ_CHAR_FIELD(relkind);
READ_INT_FIELD(rellockmode);
- READ_NODE_FIELD(tablesample);
READ_UINT_FIELD(perminfoindex);
+ READ_NODE_FIELD(tablesample);
break;
case RTE_SUBQUERY:
READ_NODE_FIELD(subquery);
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 202403051
+#define CATALOG_VERSION_NO 202403052
#endif
Oid relid; /* OID of the relation */
char relkind; /* relation kind (see pg_class.relkind) */
int rellockmode; /* lock level that query requires on the rel */
+ Index perminfoindex; /* index of RTEPermissionInfo entry, or 0 */
struct TableSampleClause *tablesample; /* sampling info, or NULL */
- Index perminfoindex;
/*
* Fields valid for a subquery RTE (else NULL):