Missing comment for ResultRelInfo in execnodes.h

Started by Etsuro Fujitaover 8 years ago4 messages
#1Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
1 attachment(s)

Here is a small patch to add a comment on its new member PartitionRoot.

Best regards,
Etsuro Fujita

Attachments:

ResultRelInfo-commnet.patchtext/plain; charset=UTF-8; name=ResultRelInfo-commnet.patchDownload
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index d33392f..7175a42 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -365,6 +365,7 @@ typedef struct JunkFilter
  *		onConflictSetWhere		list of ON CONFLICT DO UPDATE exprs (qual)
  *		PartitionCheck			partition check expression
  *		PartitionCheckExpr		partition check expression state
+ *		PartitionRoot			relation descriptor for root partitioned table
  * ----------------
  */
 typedef struct ResultRelInfo
#2Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Etsuro Fujita (#1)
1 attachment(s)
Re: Missing comment for ResultRelInfo in execnodes.h

On 6/20/17 05:50, Etsuro Fujita wrote:

Here is a small patch to add a comment on its new member PartitionRoot.

The existing comment style is kind of unusual. How about the attached
to clean it up a bit?

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

0001-Reformat-comments-about-ResultRelInfo.patchtext/plain; charset=UTF-8; name=0001-Reformat-comments-about-ResultRelInfo.patch; x-mac-creator=0; x-mac-type=0Download
From 07c05624689a3b1762a2816aeb2c70072b2382d0 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Tue, 20 Jun 2017 14:29:48 -0400
Subject: [PATCH] Reformat comments about ResultRelInfo

---
 src/include/nodes/execnodes.h | 80 +++++++++++++++++++++++++++----------------
 1 file changed, 50 insertions(+), 30 deletions(-)

diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 9c0852853a..7e214deafd 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -336,61 +336,81 @@ typedef struct JunkFilter
 	AttrNumber	jf_junkAttNo;
 } JunkFilter;
 
-/* ----------------
- *	  ResultRelInfo information
- *
- *		Whenever we update an existing relation, we have to
- *		update indices on the relation, and perhaps also fire triggers.
- *		The ResultRelInfo class is used to hold all the information needed
- *		about a result relation, including indices.. -cim 10/15/89
- *
- *		RangeTableIndex			result relation's range table index
- *		RelationDesc			relation descriptor for result relation
- *		NumIndices				# of indices existing on result relation
- *		IndexRelationDescs		array of relation descriptors for indices
- *		IndexRelationInfo		array of key/attr info for indices
- *		TrigDesc				triggers to be fired, if any
- *		TrigFunctions			cached lookup info for trigger functions
- *		TrigWhenExprs			array of trigger WHEN expr states
- *		TrigInstrument			optional runtime measurements for triggers
- *		FdwRoutine				FDW callback functions, if foreign table
- *		FdwState				available to save private state of FDW
- *		usesFdwDirectModify		true when modifying foreign table directly
- *		WithCheckOptions		list of WithCheckOption's to be checked
- *		WithCheckOptionExprs	list of WithCheckOption expr states
- *		ConstraintExprs			array of constraint-checking expr states
- *		junkFilter				for removing junk attributes from tuples
- *		projectReturning		for computing a RETURNING list
- *		onConflictSetProj		for computing ON CONFLICT DO UPDATE SET
- *		onConflictSetWhere		list of ON CONFLICT DO UPDATE exprs (qual)
- *		PartitionCheck			partition check expression
- *		PartitionCheckExpr		partition check expression state
- * ----------------
+/*
+ * ResultRelInfo
+ *
+ * Whenever we update an existing relation, we have to update indexes on the
+ * relation, and perhaps also fire triggers.  ResultRelInfo holds all the
+ * information needed about a result relation, including indexes.
  */
 typedef struct ResultRelInfo
 {
 	NodeTag		type;
+
+	/* result relation's range table index */
 	Index		ri_RangeTableIndex;
+
+	/* relation descriptor for result relation */
 	Relation	ri_RelationDesc;
+
+	/* # of indices existing on result relation */
 	int			ri_NumIndices;
+
+	/* array of relation descriptors for indices */
 	RelationPtr ri_IndexRelationDescs;
+
+	/* array of key/attr info for indices */
 	IndexInfo **ri_IndexRelationInfo;
+
+	/* triggers to be fired, if any */
 	TriggerDesc *ri_TrigDesc;
+
+	/* cached lookup info for trigger functions */
 	FmgrInfo   *ri_TrigFunctions;
+
+	/* array of trigger WHEN expr states */
 	ExprState **ri_TrigWhenExprs;
+
+	/* optional runtime measurements for triggers */
 	Instrumentation *ri_TrigInstrument;
+
+	/* FDW callback functions, if foreign table */
 	struct FdwRoutine *ri_FdwRoutine;
+
+	/* available to save private state of FDW */
 	void	   *ri_FdwState;
+
+	/* true when modifying foreign table directly */
 	bool		ri_usesFdwDirectModify;
+
+	/* list of WithCheckOption's to be checked */
 	List	   *ri_WithCheckOptions;
+
+	/* list of WithCheckOption expr states */
 	List	   *ri_WithCheckOptionExprs;
+
+	/* array of constraint-checking expr states */
 	ExprState **ri_ConstraintExprs;
+
+	/* for removing junk attributes from tuples */
 	JunkFilter *ri_junkFilter;
+
+	/* for computing a RETURNING list */
 	ProjectionInfo *ri_projectReturning;
+
+	/* for computing ON CONFLICT DO UPDATE SET */
 	ProjectionInfo *ri_onConflictSetProj;
+
+	/* list of ON CONFLICT DO UPDATE exprs (qual) */
 	ExprState  *ri_onConflictSetWhere;
+
+	/* partition check expression */
 	List	   *ri_PartitionCheck;
+
+	/* partition check expression state */
 	ExprState  *ri_PartitionCheckExpr;
+
+	/* relation descriptor for root partitioned table */
 	Relation	ri_PartitionRoot;
 } ResultRelInfo;
 
-- 
2.13.1

#3Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
In reply to: Peter Eisentraut (#2)
Re: Missing comment for ResultRelInfo in execnodes.h

On 2017/06/21 3:30, Peter Eisentraut wrote:

On 6/20/17 05:50, Etsuro Fujita wrote:

Here is a small patch to add a comment on its new member PartitionRoot.

The existing comment style is kind of unusual. How about the attached
to clean it up a bit?

+1 for that change.

Best regards,
Etsuro Fujita

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Etsuro Fujita (#3)
Re: Missing comment for ResultRelInfo in execnodes.h

On 6/20/17 22:37, Etsuro Fujita wrote:

On 2017/06/21 3:30, Peter Eisentraut wrote:

On 6/20/17 05:50, Etsuro Fujita wrote:

Here is a small patch to add a comment on its new member PartitionRoot.

The existing comment style is kind of unusual. How about the attached
to clean it up a bit?

+1 for that change.

committed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers