@@ -336,61 +336,81 @@ typedef struct JunkFilter
336
336
AttrNumber jf_junkAttNo ;
337
337
} JunkFilter ;
338
338
339
- /* ----------------
340
- * ResultRelInfo information
341
- *
342
- * Whenever we update an existing relation, we have to
343
- * update indices on the relation, and perhaps also fire triggers.
344
- * The ResultRelInfo class is used to hold all the information needed
345
- * about a result relation, including indices.. -cim 10/15/89
346
- *
347
- * RangeTableIndex result relation's range table index
348
- * RelationDesc relation descriptor for result relation
349
- * NumIndices # of indices existing on result relation
350
- * IndexRelationDescs array of relation descriptors for indices
351
- * IndexRelationInfo array of key/attr info for indices
352
- * TrigDesc triggers to be fired, if any
353
- * TrigFunctions cached lookup info for trigger functions
354
- * TrigWhenExprs array of trigger WHEN expr states
355
- * TrigInstrument optional runtime measurements for triggers
356
- * FdwRoutine FDW callback functions, if foreign table
357
- * FdwState available to save private state of FDW
358
- * usesFdwDirectModify true when modifying foreign table directly
359
- * WithCheckOptions list of WithCheckOption's to be checked
360
- * WithCheckOptionExprs list of WithCheckOption expr states
361
- * ConstraintExprs array of constraint-checking expr states
362
- * junkFilter for removing junk attributes from tuples
363
- * projectReturning for computing a RETURNING list
364
- * onConflictSetProj for computing ON CONFLICT DO UPDATE SET
365
- * onConflictSetWhere list of ON CONFLICT DO UPDATE exprs (qual)
366
- * PartitionCheck partition check expression
367
- * PartitionCheckExpr partition check expression state
368
- * ----------------
339
+ /*
340
+ * ResultRelInfo
341
+ *
342
+ * Whenever we update an existing relation, we have to update indexes on the
343
+ * relation, and perhaps also fire triggers. ResultRelInfo holds all the
344
+ * information needed about a result relation, including indexes.
369
345
*/
370
346
typedef struct ResultRelInfo
371
347
{
372
348
NodeTag type ;
349
+
350
+ /* result relation's range table index */
373
351
Index ri_RangeTableIndex ;
352
+
353
+ /* relation descriptor for result relation */
374
354
Relation ri_RelationDesc ;
355
+
356
+ /* # of indices existing on result relation */
375
357
int ri_NumIndices ;
358
+
359
+ /* array of relation descriptors for indices */
376
360
RelationPtr ri_IndexRelationDescs ;
361
+
362
+ /* array of key/attr info for indices */
377
363
IndexInfo * * ri_IndexRelationInfo ;
364
+
365
+ /* triggers to be fired, if any */
378
366
TriggerDesc * ri_TrigDesc ;
367
+
368
+ /* cached lookup info for trigger functions */
379
369
FmgrInfo * ri_TrigFunctions ;
370
+
371
+ /* array of trigger WHEN expr states */
380
372
ExprState * * ri_TrigWhenExprs ;
373
+
374
+ /* optional runtime measurements for triggers */
381
375
Instrumentation * ri_TrigInstrument ;
376
+
377
+ /* FDW callback functions, if foreign table */
382
378
struct FdwRoutine * ri_FdwRoutine ;
379
+
380
+ /* available to save private state of FDW */
383
381
void * ri_FdwState ;
382
+
383
+ /* true when modifying foreign table directly */
384
384
bool ri_usesFdwDirectModify ;
385
+
386
+ /* list of WithCheckOption's to be checked */
385
387
List * ri_WithCheckOptions ;
388
+
389
+ /* list of WithCheckOption expr states */
386
390
List * ri_WithCheckOptionExprs ;
391
+
392
+ /* array of constraint-checking expr states */
387
393
ExprState * * ri_ConstraintExprs ;
394
+
395
+ /* for removing junk attributes from tuples */
388
396
JunkFilter * ri_junkFilter ;
397
+
398
+ /* for computing a RETURNING list */
389
399
ProjectionInfo * ri_projectReturning ;
400
+
401
+ /* for computing ON CONFLICT DO UPDATE SET */
390
402
ProjectionInfo * ri_onConflictSetProj ;
403
+
404
+ /* list of ON CONFLICT DO UPDATE exprs (qual) */
391
405
ExprState * ri_onConflictSetWhere ;
406
+
407
+ /* partition check expression */
392
408
List * ri_PartitionCheck ;
409
+
410
+ /* partition check expression state */
393
411
ExprState * ri_PartitionCheckExpr ;
412
+
413
+ /* relation descriptor for root partitioned table */
394
414
Relation ri_PartitionRoot ;
395
415
} ResultRelInfo ;
396
416
0 commit comments