Commit 113b0045 authored by Peter Eisentraut's avatar Peter Eisentraut

Reformat comments about ResultRelInfo

Also add a comment on its new member PartitionRoot.
Reported-by: default avatarEtsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
parent 382ceffd
...@@ -336,61 +336,81 @@ typedef struct JunkFilter ...@@ -336,61 +336,81 @@ typedef struct JunkFilter
AttrNumber jf_junkAttNo; AttrNumber jf_junkAttNo;
} JunkFilter; } JunkFilter;
/* ---------------- /*
* ResultRelInfo information * ResultRelInfo
* *
* Whenever we update an existing relation, we have to * Whenever we update an existing relation, we have to update indexes on the
* update indices on the relation, and perhaps also fire triggers. * relation, and perhaps also fire triggers. ResultRelInfo holds all the
* The ResultRelInfo class is used to hold all the information needed * information needed about a result relation, including indexes.
* 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
* ----------------
*/ */
typedef struct ResultRelInfo typedef struct ResultRelInfo
{ {
NodeTag type; NodeTag type;
/* result relation's range table index */
Index ri_RangeTableIndex; Index ri_RangeTableIndex;
/* relation descriptor for result relation */
Relation ri_RelationDesc; Relation ri_RelationDesc;
/* # of indices existing on result relation */
int ri_NumIndices; int ri_NumIndices;
/* array of relation descriptors for indices */
RelationPtr ri_IndexRelationDescs; RelationPtr ri_IndexRelationDescs;
/* array of key/attr info for indices */
IndexInfo **ri_IndexRelationInfo; IndexInfo **ri_IndexRelationInfo;
/* triggers to be fired, if any */
TriggerDesc *ri_TrigDesc; TriggerDesc *ri_TrigDesc;
/* cached lookup info for trigger functions */
FmgrInfo *ri_TrigFunctions; FmgrInfo *ri_TrigFunctions;
/* array of trigger WHEN expr states */
ExprState **ri_TrigWhenExprs; ExprState **ri_TrigWhenExprs;
/* optional runtime measurements for triggers */
Instrumentation *ri_TrigInstrument; Instrumentation *ri_TrigInstrument;
/* FDW callback functions, if foreign table */
struct FdwRoutine *ri_FdwRoutine; struct FdwRoutine *ri_FdwRoutine;
/* available to save private state of FDW */
void *ri_FdwState; void *ri_FdwState;
/* true when modifying foreign table directly */
bool ri_usesFdwDirectModify; bool ri_usesFdwDirectModify;
/* list of WithCheckOption's to be checked */
List *ri_WithCheckOptions; List *ri_WithCheckOptions;
/* list of WithCheckOption expr states */
List *ri_WithCheckOptionExprs; List *ri_WithCheckOptionExprs;
/* array of constraint-checking expr states */
ExprState **ri_ConstraintExprs; ExprState **ri_ConstraintExprs;
/* for removing junk attributes from tuples */
JunkFilter *ri_junkFilter; JunkFilter *ri_junkFilter;
/* for computing a RETURNING list */
ProjectionInfo *ri_projectReturning; ProjectionInfo *ri_projectReturning;
/* for computing ON CONFLICT DO UPDATE SET */
ProjectionInfo *ri_onConflictSetProj; ProjectionInfo *ri_onConflictSetProj;
/* list of ON CONFLICT DO UPDATE exprs (qual) */
ExprState *ri_onConflictSetWhere; ExprState *ri_onConflictSetWhere;
/* partition check expression */
List *ri_PartitionCheck; List *ri_PartitionCheck;
/* partition check expression state */
ExprState *ri_PartitionCheckExpr; ExprState *ri_PartitionCheckExpr;
/* relation descriptor for root partitioned table */
Relation ri_PartitionRoot; Relation ri_PartitionRoot;
} ResultRelInfo; } ResultRelInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment