@@ -404,10 +404,10 @@ RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
404
404
* Caller is responsible for opening the indexes.
405
405
*/
406
406
void
407
- ExecSimpleRelationInsert (EState * estate , TupleTableSlot * slot )
407
+ ExecSimpleRelationInsert (ResultRelInfo * resultRelInfo ,
408
+ EState * estate , TupleTableSlot * slot )
408
409
{
409
410
bool skip_tuple = false;
410
- ResultRelInfo * resultRelInfo = estate -> es_result_relation_info ;
411
411
Relation rel = resultRelInfo -> ri_RelationDesc ;
412
412
413
413
/* For now we support only tables. */
@@ -430,7 +430,8 @@ ExecSimpleRelationInsert(EState *estate, TupleTableSlot *slot)
430
430
/* Compute stored generated columns */
431
431
if (rel -> rd_att -> constr &&
432
432
rel -> rd_att -> constr -> has_generated_stored )
433
- ExecComputeStoredGenerated (estate , slot , CMD_INSERT );
433
+ ExecComputeStoredGenerated (resultRelInfo , estate , slot ,
434
+ CMD_INSERT );
434
435
435
436
/* Check the constraints of the tuple */
436
437
if (rel -> rd_att -> constr )
@@ -442,7 +443,8 @@ ExecSimpleRelationInsert(EState *estate, TupleTableSlot *slot)
442
443
simple_table_tuple_insert (resultRelInfo -> ri_RelationDesc , slot );
443
444
444
445
if (resultRelInfo -> ri_NumIndices > 0 )
445
- recheckIndexes = ExecInsertIndexTuples (slot , estate , false, NULL ,
446
+ recheckIndexes = ExecInsertIndexTuples (resultRelInfo ,
447
+ slot , estate , false, NULL ,
446
448
NIL );
447
449
448
450
/* AFTER ROW INSERT Triggers */
@@ -466,11 +468,11 @@ ExecSimpleRelationInsert(EState *estate, TupleTableSlot *slot)
466
468
* Caller is responsible for opening the indexes.
467
469
*/
468
470
void
469
- ExecSimpleRelationUpdate (EState * estate , EPQState * epqstate ,
471
+ ExecSimpleRelationUpdate (ResultRelInfo * resultRelInfo ,
472
+ EState * estate , EPQState * epqstate ,
470
473
TupleTableSlot * searchslot , TupleTableSlot * slot )
471
474
{
472
475
bool skip_tuple = false;
473
- ResultRelInfo * resultRelInfo = estate -> es_result_relation_info ;
474
476
Relation rel = resultRelInfo -> ri_RelationDesc ;
475
477
ItemPointer tid = & (searchslot -> tts_tid );
476
478
@@ -496,7 +498,8 @@ ExecSimpleRelationUpdate(EState *estate, EPQState *epqstate,
496
498
/* Compute stored generated columns */
497
499
if (rel -> rd_att -> constr &&
498
500
rel -> rd_att -> constr -> has_generated_stored )
499
- ExecComputeStoredGenerated (estate , slot , CMD_UPDATE );
501
+ ExecComputeStoredGenerated (resultRelInfo , estate , slot ,
502
+ CMD_UPDATE );
500
503
501
504
/* Check the constraints of the tuple */
502
505
if (rel -> rd_att -> constr )
@@ -508,7 +511,8 @@ ExecSimpleRelationUpdate(EState *estate, EPQState *epqstate,
508
511
& update_indexes );
509
512
510
513
if (resultRelInfo -> ri_NumIndices > 0 && update_indexes )
511
- recheckIndexes = ExecInsertIndexTuples (slot , estate , false, NULL ,
514
+ recheckIndexes = ExecInsertIndexTuples (resultRelInfo ,
515
+ slot , estate , false, NULL ,
512
516
NIL );
513
517
514
518
/* AFTER ROW UPDATE Triggers */
@@ -527,11 +531,11 @@ ExecSimpleRelationUpdate(EState *estate, EPQState *epqstate,
527
531
* Caller is responsible for opening the indexes.
528
532
*/
529
533
void
530
- ExecSimpleRelationDelete (EState * estate , EPQState * epqstate ,
534
+ ExecSimpleRelationDelete (ResultRelInfo * resultRelInfo ,
535
+ EState * estate , EPQState * epqstate ,
531
536
TupleTableSlot * searchslot )
532
537
{
533
538
bool skip_tuple = false;
534
- ResultRelInfo * resultRelInfo = estate -> es_result_relation_info ;
535
539
Relation rel = resultRelInfo -> ri_RelationDesc ;
536
540
ItemPointer tid = & searchslot -> tts_tid ;
537
541
0 commit comments