From 6ea6074ab8bb1bf61be2b43ce919bf88ac45a2ff Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Mon, 28 Nov 2022 17:37:49 +0100
Subject: [PATCH v28 4/8] pgindent

---
 contrib/postgres_fdw/postgres_fdw.c       |  4 ++--
 src/backend/commands/view.c               | 15 ++++++++-------
 src/backend/executor/execMain.c           | 22 +++++++++++-----------
 src/backend/executor/execUtils.c          |  4 ++--
 src/backend/optimizer/plan/setrefs.c      | 10 +++++-----
 src/backend/optimizer/plan/subselect.c    |  4 ++--
 src/backend/optimizer/prep/prepjointree.c |  1 +
 src/backend/optimizer/util/inherit.c      | 14 +++++++-------
 src/backend/optimizer/util/relnode.c      |  4 ++--
 src/backend/parser/analyze.c              | 12 ++++++------
 src/backend/rewrite/rewriteHandler.c      | 18 +++++++++---------
 src/backend/rewrite/rewriteManip.c        |  2 +-
 src/backend/utils/cache/relcache.c        |  4 ++--
 src/include/executor/executor.h           |  6 +++---
 src/include/nodes/execnodes.h             |  4 ++--
 src/include/nodes/parsenodes.h            |  9 ++++-----
 src/include/nodes/plannodes.h             |  5 ++---
 src/include/parser/parse_node.h           |  4 ++--
 src/include/rewrite/rewriteManip.h        |  4 ++--
 src/tools/pgindent/typedefs.list          |  2 ++
 20 files changed, 75 insertions(+), 73 deletions(-)

diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index c0dc485301..a28937c8a1 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -659,8 +659,8 @@ postgresGetForeignRelSize(PlannerInfo *root,
 	/*
 	 * If the table or the server is configured to use remote estimates,
 	 * identify which user to do remote access as during planning.  This
-	 * should match what ExecCheckPermissions() does.  If we fail due to
-	 * lack of permissions, the query would have failed at runtime anyway.
+	 * should match what ExecCheckPermissions() does.  If we fail due to lack
+	 * of permissions, the query would have failed at runtime anyway.
 	 */
 	if (fpinfo->use_remote_estimate)
 	{
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c
index 6bb707fd51..cdd73e148e 100644
--- a/src/backend/commands/view.c
+++ b/src/backend/commands/view.c
@@ -417,11 +417,11 @@ UpdateRangeTableOfViewParse(Oid viewOid, Query *viewParse)
 	/*
 	 * Add only the "old" RTEPermissionInfo at the head of view query's list
 	 * and update the other RTEs' perminfoindex accordingly.  When rewriting a
-	 * query on the view, ApplyRetrieveRule() will transfer the view relation's
-	 * permission details into this RTEPermissionInfo.  That's needed because
-	 * the view's RTE itself will be transposed into a subquery RTE that can't
-	 * carry the permission details; see the code stanza toward the end of
-	 * ApplyRetrieveRule() for how that's done.
+	 * query on the view, ApplyRetrieveRule() will transfer the view
+	 * relation's permission details into this RTEPermissionInfo.  That's
+	 * needed because the view's RTE itself will be transposed into a subquery
+	 * RTE that can't carry the permission details; see the code stanza toward
+	 * the end of ApplyRetrieveRule() for how that's done.
 	 */
 	viewParse->rtepermlist = lcons(rte_perminfo1, viewParse->rtepermlist);
 	foreach(lc, viewParse->rtable)
@@ -431,9 +431,10 @@ UpdateRangeTableOfViewParse(Oid viewOid, Query *viewParse)
 		if (rte->perminfoindex > 0)
 			rte->perminfoindex += 1;
 	}
+
 	/*
-	 * Also make the "new" RTE's RTEPermissionInfo undiscoverable.  This is bit
-	 * of a hack given that all the non-child RTE_RELATION entries really
+	 * Also make the "new" RTE's RTEPermissionInfo undiscoverable.  This is a
+	 * bit of a hack given that all the non-child RTE_RELATION entries really
 	 * should have a RTEPermissionInfo, but this dummy "new" RTE is going to
 	 * go away anyway in the very near future.
 	 */
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 955894fd95..5c8dfa96d7 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -93,8 +93,8 @@ static void ExecutePlan(EState *estate, PlanState *planstate,
 						bool execute_once);
 static bool ExecCheckOneRelPerms(RTEPermissionInfo *perminfo);
 static bool ExecCheckPermissionsModified(Oid relOid, Oid userid,
-									  Bitmapset *modifiedCols,
-									  AclMode requiredPerms);
+										 Bitmapset *modifiedCols,
+										 AclMode requiredPerms);
 static void ExecCheckXactReadOnly(PlannedStmt *plannedstmt);
 static char *ExecBuildSlotValueDescription(Oid reloid,
 										   TupleTableSlot *slot,
@@ -619,8 +619,8 @@ ExecCheckOneRelPerms(RTEPermissionInfo *perminfo)
 	 *
 	 * Note: GetUserId() is presently fast enough that there's no harm in
 	 * calling it separately for each relation.  If that stops being true, we
-	 * could call it once in ExecCheckPermissions and pass the userid down from
-	 * there.  But for now, no need for the extra clutter.
+	 * could call it once in ExecCheckPermissions and pass the userid down
+	 * from there.  But for now, no need for the extra clutter.
 	 */
 	userid = perminfo->checkAsUser ? perminfo->checkAsUser : GetUserId();
 
@@ -689,15 +689,15 @@ ExecCheckOneRelPerms(RTEPermissionInfo *perminfo)
 		 * privilege as specified by remainingPerms.
 		 */
 		if (remainingPerms & ACL_INSERT && !ExecCheckPermissionsModified(relOid,
-																	  userid,
-																	  perminfo->insertedCols,
-																	  ACL_INSERT))
+																		 userid,
+																		 perminfo->insertedCols,
+																		 ACL_INSERT))
 			return false;
 
 		if (remainingPerms & ACL_UPDATE && !ExecCheckPermissionsModified(relOid,
-																	  userid,
-																	  perminfo->updatedCols,
-																	  ACL_UPDATE))
+																		 userid,
+																		 perminfo->updatedCols,
+																		 ACL_UPDATE))
 			return false;
 	}
 	return true;
@@ -710,7 +710,7 @@ ExecCheckOneRelPerms(RTEPermissionInfo *perminfo)
  */
 static bool
 ExecCheckPermissionsModified(Oid relOid, Oid userid, Bitmapset *modifiedCols,
-						  AclMode requiredPerms)
+							 AclMode requiredPerms)
 {
 	int			col = -1;
 
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c
index 19bca1eb45..ae9ba16dbf 100644
--- a/src/backend/executor/execUtils.c
+++ b/src/backend/executor/execUtils.c
@@ -1385,7 +1385,7 @@ ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate)
 	/* Map the columns to child's attribute numbers if needed. */
 	if (relinfo->ri_RootResultRelInfo)
 	{
-		AttrMap *map = ExecGetRootToChildMap(relinfo, estate);
+		AttrMap    *map = ExecGetRootToChildMap(relinfo, estate);
 
 		if (map)
 			return execute_attr_map_cols(map, perminfo->insertedCols);
@@ -1406,7 +1406,7 @@ ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
 	/* Map the columns to child's attribute numbers if needed. */
 	if (relinfo->ri_RootResultRelInfo)
 	{
-		AttrMap *map = ExecGetRootToChildMap(relinfo, estate);
+		AttrMap    *map = ExecGetRootToChildMap(relinfo, estate);
 
 		if (map)
 			return execute_attr_map_cols(map, perminfo->updatedCols);
diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c
index d88fa0b2a8..534090a614 100644
--- a/src/backend/optimizer/plan/setrefs.c
+++ b/src/backend/optimizer/plan/setrefs.c
@@ -82,8 +82,8 @@ typedef struct
 /* Context info for flatten_rtes_walker() */
 typedef struct
 {
-	PlannerGlobal  *glob;
-	Query		   *query;
+	PlannerGlobal *glob;
+	Query	   *query;
 } flatten_rtes_walker_context;
 
 /*
@@ -553,9 +553,9 @@ add_rte_to_flat_rtable(PlannerGlobal *glob, List *rtepermlist,
 		glob->relationOids = lappend_oid(glob->relationOids, newrte->relid);
 
 		/*
-		 * Add the RTEPermissionInfo, if any, corresponding to this RTE to
-		 * the flattened global list.  Also update the perminfoindex to
-		 * reflect the RTEPermissionInfo's new position.
+		 * Add the RTEPermissionInfo, if any, corresponding to this RTE to the
+		 * flattened global list.  Also update the perminfoindex to reflect
+		 * the RTEPermissionInfo's new position.
 		 */
 		if (rte->perminfoindex > 0)
 		{
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c
index bc3f7519e4..bee4072301 100644
--- a/src/backend/optimizer/plan/subselect.c
+++ b/src/backend/optimizer/plan/subselect.c
@@ -1497,8 +1497,8 @@ convert_EXISTS_sublink_to_join(PlannerInfo *root, SubLink *sublink,
 		return NULL;
 
 	/*
-	 * Now we can attach the modified subquery rtable to the parent.
-	 * This also adds subquery's RTEPermissionInfos into the upper query.
+	 * Now we can attach the modified subquery rtable to the parent. This also
+	 * adds subquery's RTEPermissionInfos into the upper query.
 	 */
 	parse->rtable = CombineRangeTables(parse->rtable, subselect->rtable,
 									   subselect->rtepermlist,
diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c
index 9733323e3e..f70b0c9862 100644
--- a/src/backend/optimizer/prep/prepjointree.c
+++ b/src/backend/optimizer/prep/prepjointree.c
@@ -1208,6 +1208,7 @@ pull_up_simple_subquery(PlannerInfo *root, Node *jtnode, RangeTblEntry *rte,
 	parse->rtable = CombineRangeTables(parse->rtable, subquery->rtable,
 									   subquery->rtepermlist,
 									   &parse->rtepermlist);
+
 	/*
 	 * Pull up any FOR UPDATE/SHARE markers, too.  (OffsetVarNodes already
 	 * adjusted the marker rtindexes, so just concat the lists.)
diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c
index d8db04da73..b22422b166 100644
--- a/src/backend/optimizer/util/inherit.c
+++ b/src/backend/optimizer/util/inherit.c
@@ -416,7 +416,7 @@ expand_partitioned_rtentry(PlannerInfo *root, RelOptInfo *relinfo,
 		if (childrel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
 		{
 			AppendRelInfo *appinfo = root->append_rel_array[childRTindex];
-			Bitmapset *child_updatedCols;
+			Bitmapset  *child_updatedCols;
 
 			child_updatedCols = translate_col_privs(parent_updatedCols,
 													appinfo->translated_vars);
@@ -662,19 +662,19 @@ expand_single_inheritance_child(PlannerInfo *root, RangeTblEntry *parentrte,
 Bitmapset *
 get_rel_all_updated_cols(PlannerInfo *root, RelOptInfo *rel)
 {
-	Index	relid;
+	Index		relid;
 	RangeTblEntry *rte;
 	RTEPermissionInfo *perminfo;
-	Bitmapset *updatedCols,
-			  *extraUpdatedCols;
+	Bitmapset  *updatedCols,
+			   *extraUpdatedCols;
 
 	Assert(root->parse->commandType == CMD_UPDATE);
 	Assert(IS_SIMPLE_REL(rel));
 
 	/*
 	 * We obtain updatedCols and extraUpdatedCols for the query's result
-	 * relation.  Then, if necessary, we map it to the column numbers of
-	 * the relation for which they were requested.
+	 * relation.  Then, if necessary, we map it to the column numbers of the
+	 * relation for which they were requested.
 	 */
 	relid = root->parse->resultRelation;
 	rte = planner_rt_fetch(relid, root);
@@ -932,7 +932,7 @@ translate_col_privs_multilevel(PlannerInfo *root, RelOptInfo *rel,
 							   RelOptInfo *top_parent_rel,
 							   Bitmapset *top_parent_cols)
 {
-	Bitmapset *result;
+	Bitmapset  *result;
 	AppendRelInfo *appinfo;
 
 	if (top_parent_cols == NULL)
diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c
index a1dedf52d5..800fe490d9 100644
--- a/src/backend/optimizer/util/relnode.c
+++ b/src/backend/optimizer/util/relnode.c
@@ -227,8 +227,8 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptInfo *parent)
 	if (rte->rtekind == RTE_RELATION)
 	{
 		/*
-		 * Get the userid from the relation's RTEPermissionInfo, though
-		 * only the tables mentioned in query are assigned RTEPermissionInfos.
+		 * Get the userid from the relation's RTEPermissionInfo, though only
+		 * the tables mentioned in query are assigned RTEPermissionInfos.
 		 * Child relations (otherrels) simply use the parent's value.
 		 */
 		if (parent == NULL)
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 5279866f43..40473fe86f 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -596,12 +596,12 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
 
 	/*
 	 * If a non-nil rangetable/namespace was passed in, and we are doing
-	 * INSERT/SELECT, arrange to pass the rangetable/rtepermlist/namespace down
-	 * to the SELECT.  This can only happen if we are inside a CREATE RULE,
-	 * and in that case we want the rule's OLD and NEW rtable entries to appear
-	 * as part of the SELECT's rtable, not as outer references for it. (Kluge!)
-	 * The SELECT's joinlist is not affected however.  We must do this before
-	 * adding the target table to the INSERT's rtable.
+	 * INSERT/SELECT, arrange to pass the rangetable/rtepermlist/namespace
+	 * down to the SELECT.  This can only happen if we are inside a CREATE
+	 * RULE, and in that case we want the rule's OLD and NEW rtable entries to
+	 * appear as part of the SELECT's rtable, not as outer references for it.
+	 * (Kluge!) The SELECT's joinlist is not affected however.  We must do
+	 * this before adding the target table to the INSERT's rtable.
 	 */
 	if (isGeneralSelect)
 	{
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c
index ac142da7b9..83aad2d19a 100644
--- a/src/backend/rewrite/rewriteHandler.c
+++ b/src/backend/rewrite/rewriteHandler.c
@@ -404,9 +404,9 @@ rewriteRuleAction(Query *parsetree,
 	 * checked correctly.
 	 *
 	 * If the rule is INSTEAD, then the original query won't be executed at
-	 * all, and so its permissions list must be preserved so that the
-	 * executor will do the correct permissions checks on the relations
-	 * referenced in it.  This allows us to check that the caller has, say,
+	 * all, and so its permissions list must be preserved so that the executor
+	 * will do the correct permissions checks on the relations referenced in
+	 * it.  This allows us to check that the caller has, say,
 	 * insert-permission on a view, when the view is not semantically
 	 * referenced at all in the resulting query.
 	 *
@@ -3299,9 +3299,9 @@ rewriteTargetView(Query *parsetree, Relation view)
 	/*
 	 * Now for the per-column permissions bits.
 	 *
-	 * Set new_perminfo->selectedCols to include permission check bits for
-	 * all base-rel columns referenced by the view and insertedCols/updatedCols
-	 * to include all the columns the outer query is trying to modify, adjusting
+	 * Set new_perminfo->selectedCols to include permission check bits for all
+	 * base-rel columns referenced by the view and insertedCols/updatedCols to
+	 * include all the columns the outer query is trying to modify, adjusting
 	 * the column numbers as needed.  We leave selectedCols as-is, so the view
 	 * owner must have read permission for all columns used in the view
 	 * definition, even if some of them are not read by the outer query.  We
@@ -3311,9 +3311,9 @@ rewriteTargetView(Query *parsetree, Relation view)
 	 * if optimization finds that some of them can be discarded during query
 	 * transformation.  The flattening we're doing here is an optional
 	 * optimization, too.  (If you are unpersuaded and want to change this,
-	 * note that applying adjust_view_column_set to view_perminfo->selectedCols
-	 * is clearly *not* the right answer, since that neglects base-rel columns
-	 * used in the view's WHERE quals.)
+	 * note that applying adjust_view_column_set to
+	 * view_perminfo->selectedCols is clearly *not* the right answer, since
+	 * that neglects base-rel columns used in the view's WHERE quals.)
 	 *
 	 * This step needs the modified view targetlist, so we have to do things
 	 * in this order.
diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c
index 1aa7346d9b..3577c7f335 100644
--- a/src/backend/rewrite/rewriteManip.c
+++ b/src/backend/rewrite/rewriteManip.c
@@ -1554,7 +1554,7 @@ CombineRangeTables(List *rtable1, List *rtable2,
 	{
 		foreach(l, rtable2)
 		{
-			RangeTblEntry  *rte = lfirst_node(RangeTblEntry, l);
+			RangeTblEntry *rte = lfirst_node(RangeTblEntry, l);
 
 			if (rte->perminfoindex > 0)
 				rte->perminfoindex += offset;
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 787ad8b232..c3feacb4f8 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -847,8 +847,8 @@ RelationBuildRuleLock(Relation relation)
 
 		/*
 		 * Scan through the rule's actions and set the checkAsUser field on
-		 * all RTEPermissionInfos. We have to look at the qual as well, in case
-		 * it contains sublinks.
+		 * all RTEPermissionInfos. We have to look at the qual as well, in
+		 * case it contains sublinks.
 		 *
 		 * The reason for doing this when the rule is loaded, rather than when
 		 * it is stored, is that otherwise ALTER TABLE OWNER would have to
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index fc98109cdc..6f5a7038e1 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -197,7 +197,7 @@ extern void ExecutorEnd(QueryDesc *queryDesc);
 extern void standard_ExecutorEnd(QueryDesc *queryDesc);
 extern void ExecutorRewind(QueryDesc *queryDesc);
 extern bool ExecCheckPermissions(List *rangeTable,
-				 List *rtepermlist, bool ereport_on_violation);
+								 List *rtepermlist, bool ereport_on_violation);
 extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation);
 extern void InitResultRelInfo(ResultRelInfo *resultRelInfo,
 							  Relation resultRelationDesc,
@@ -603,9 +603,9 @@ extern TupleTableSlot *ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relI
 extern TupleTableSlot *ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo);
 extern TupleConversionMap *ExecGetChildToRootMap(ResultRelInfo *resultRelInfo);
 extern AttrMap *ExecGetRootToChildMap(ResultRelInfo *resultRelInfo,
-					  EState *estate);
+									  EState *estate);
 
-extern Oid ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate);
+extern Oid	ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate);
 extern Bitmapset *ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate);
 extern Bitmapset *ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate);
 extern Bitmapset *ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate);
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index c070dd97d5..0e6c940ed5 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -568,7 +568,7 @@ typedef struct ResultRelInfo
 	 * describe a given child table's columns; see ExecGetInsertedCols() et
 	 * al.  Like ri_ChildToRootMap, computed only if needed.
 	 */
-	AttrMap	   *ri_RootToChildMap;
+	AttrMap    *ri_RootToChildMap;
 	bool		ri_RootToChildMapValid;
 
 	/* for use by copyfrom.c when performing multi-inserts */
@@ -621,7 +621,7 @@ typedef struct EState
 								 * pointers, or NULL if not yet opened */
 	struct ExecRowMark **es_rowmarks;	/* Array of per-range-table-entry
 										 * ExecRowMarks, or NULL if none */
-	List	   *es_rtepermlist;		/* List of RTEPermissionInfo */
+	List	   *es_rtepermlist; /* List of RTEPermissionInfo */
 	PlannedStmt *es_plannedstmt;	/* link to top of plan tree */
 	const char *es_sourceText;	/* Source text from QueryDesc */
 
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index f3afca7316..6fef3bbd81 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -154,9 +154,8 @@ typedef struct Query
 	List	   *cteList;		/* WITH list (of CommonTableExpr's) */
 
 	List	   *rtable;			/* list of range table entries */
-	List	   *rtepermlist;	/* list of RTEPermissionInfo nodes for
-								 * the rtable entries having
-								 * perminfoindex > 0 */
+	List	   *rtepermlist;	/* list of RTEPermissionInfo nodes for the
+								 * rtable entries having perminfoindex > 0 */
 	FromExpr   *jointree;		/* table join tree (FROM and WHERE clauses);
 								 * also USING clause for MERGE */
 
@@ -1028,8 +1027,8 @@ typedef struct RangeTblEntry
 	 * avoid getting an additional, lesser lock.
 	 *
 	 * perminfoindex is 1-based index of the RTEPermissionInfo belonging to
-	 * this RTE in the containing query's rtepermlist; 0 if permissions
-	 * need not be checked for the RTE.
+	 * this RTE in the containing query's rtepermlist; 0 if permissions need
+	 * not be checked for the RTE.
 	 */
 	Oid			relid;			/* OID of the relation */
 	char		relkind;		/* relation kind (see pg_class.relkind) */
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index e3a5233dd7..9c54cbbc1d 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -75,9 +75,8 @@ typedef struct PlannedStmt
 	/* rtable indexes of target relations for INSERT/UPDATE/DELETE/MERGE */
 	List	   *resultRelations;	/* integer list of RT indexes, or NIL */
 
-	List	   *rtepermlist;	/* list of RTEPermissionInfo nodes for
-								 * the rtable entries having
-								 * perminfoindex > 0 */
+	List	   *rtepermlist;	/* list of RTEPermissionInfo nodes for the
+								 * rtable entries having perminfoindex > 0 */
 
 	List	   *appendRelations;	/* list of AppendRelInfo nodes */
 
diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h
index 69665aba41..7aebed5863 100644
--- a/src/include/parser/parse_node.h
+++ b/src/include/parser/parse_node.h
@@ -184,8 +184,8 @@ struct ParseState
 	ParseState *parentParseState;	/* stack link */
 	const char *p_sourcetext;	/* source text, or NULL if not available */
 	List	   *p_rtable;		/* range table so far */
-	List	   *p_rtepermlist;	/* list of RTEPermissionInfo nodes for
-								 * each RTE_RELATION entry in rtable */
+	List	   *p_rtepermlist;	/* list of RTEPermissionInfo nodes for each
+								 * RTE_RELATION entry in rtable */
 	List	   *p_joinexprs;	/* JoinExprs for RTE_JOIN p_rtable entries */
 	List	   *p_joinlist;		/* join items so far (will become FromExpr
 								 * node's fromlist) */
diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h
index 90565a8e17..2f56f7a6ac 100644
--- a/src/include/rewrite/rewriteManip.h
+++ b/src/include/rewrite/rewriteManip.h
@@ -84,7 +84,7 @@ extern Node *ReplaceVarsFromTargetList(Node *node,
 									   int nomatch_varno,
 									   bool *outer_hasSubLinks);
 extern List *CombineRangeTables(List *rtable1, List *rtable2,
-				   List *rtepermlist2,
-				   List **rtepermlist1);
+								List *rtepermlist2,
+								List **rtepermlist1);
 
 #endif							/* REWRITEMANIP_H */
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 2f5802195d..1d0134db8d 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -2188,6 +2188,7 @@ RI_ConstraintInfo
 RI_QueryHashEntry
 RI_QueryKey
 RTEKind
+RTEPermissionInfo
 RWConflict
 RWConflictPoolHeader
 Range
@@ -3265,6 +3266,7 @@ fix_scan_expr_context
 fix_upper_expr_context
 fix_windowagg_cond_context
 flatten_join_alias_vars_context
+flatten_rtes_walker_context
 float4
 float4KEY
 float8
-- 
2.30.2

