@@ -417,7 +417,7 @@ select_partition_for_insert(Datum value, Oid value_type,
417
417
ResultPartsStorage * parts_storage ,
418
418
EState * estate )
419
419
{
420
- MemoryContext old_cxt ;
420
+ MemoryContext old_mcxt ;
421
421
ResultRelInfoHolder * rri_holder ;
422
422
Oid selected_partid = InvalidOid ;
423
423
Oid * parts ;
@@ -439,9 +439,9 @@ select_partition_for_insert(Datum value, Oid value_type,
439
439
else selected_partid = parts [0 ];
440
440
441
441
/* Replace parent table with a suitable partition */
442
- old_cxt = MemoryContextSwitchTo (estate -> es_query_cxt );
442
+ old_mcxt = MemoryContextSwitchTo (estate -> es_query_cxt );
443
443
rri_holder = scan_result_parts_storage (selected_partid ,parts_storage );
444
- MemoryContextSwitchTo (old_cxt );
444
+ MemoryContextSwitchTo (old_mcxt );
445
445
446
446
/* Could not find suitable partition */
447
447
if (rri_holder == NULL )
@@ -531,12 +531,12 @@ partition_filter_create_scan_state(CustomScan *node)
531
531
void
532
532
partition_filter_begin (CustomScanState * node ,EState * estate ,int eflags )
533
533
{
534
- Index varno = 1 ;
535
- Node * expr ;
536
- MemoryContext old_cxt ;
537
- PartitionFilterState * state = (PartitionFilterState * )node ;
538
- const PartRelationInfo * prel ;
539
- ListCell * lc ;
534
+ Index varno = 1 ;
535
+ Node * expr ;
536
+ MemoryContext old_mcxt ;
537
+ PartitionFilterState * state = (PartitionFilterState * )node ;
538
+ const PartRelationInfo * prel ;
539
+ ListCell * lc ;
540
540
541
541
/* It's convenient to store PlanState in 'custom_ps' */
542
542
node -> custom_ps = list_make1 (ExecInitNode (state -> subplan ,estate ,eflags ));
@@ -562,9 +562,9 @@ partition_filter_begin(CustomScanState *node, EState *estate, int eflags)
562
562
}
563
563
564
564
/* Prepare state for expression execution */
565
- old_cxt = MemoryContextSwitchTo (estate -> es_query_cxt );
565
+ old_mcxt = MemoryContextSwitchTo (estate -> es_query_cxt );
566
566
state -> expr_state = ExecInitExpr ((Expr * )expr ,NULL );
567
- MemoryContextSwitchTo (old_cxt );
567
+ MemoryContextSwitchTo (old_mcxt );
568
568
}
569
569
570
570
/* Init ResultRelInfo cache */
@@ -595,13 +595,13 @@ partition_filter_exec(CustomScanState *node)
595
595
596
596
if (!TupIsNull (slot ))
597
597
{
598
- MemoryContext old_cxt ;
599
- const PartRelationInfo * prel ;
600
- ResultRelInfoHolder * rri_holder ;
601
- bool isnull ;
602
- Datum value ;
603
- ExprDoneCond itemIsDone ;
604
- TupleTableSlot * tmp_slot ;
598
+ MemoryContext old_mcxt ;
599
+ const PartRelationInfo * prel ;
600
+ ResultRelInfoHolder * rri_holder ;
601
+ bool isnull ;
602
+ Datum value ;
603
+ ExprDoneCond itemIsDone ;
604
+ TupleTableSlot * tmp_slot ;
605
605
606
606
/* Fetch PartRelationInfo for this partitioned relation */
607
607
prel = get_pathman_relation_info (state -> partitioned_table );
@@ -616,7 +616,7 @@ partition_filter_exec(CustomScanState *node)
616
616
}
617
617
618
618
/* Switch to per-tuple context */
619
- old_cxt = MemoryContextSwitchTo (GetPerTupleMemoryContext (estate ));
619
+ old_mcxt = MemoryContextSwitchTo (GetPerTupleMemoryContext (estate ));
620
620
621
621
/* Execute expression */
622
622
tmp_slot = econtext -> ecxt_scantuple ;
@@ -635,7 +635,7 @@ partition_filter_exec(CustomScanState *node)
635
635
& state -> result_parts ,estate );
636
636
637
637
/* Switch back and clean up per-tuple context */
638
- MemoryContextSwitchTo (old_cxt );
638
+ MemoryContextSwitchTo (old_mcxt );
639
639
ResetExprContext (econtext );
640
640
641
641
/* Magic: replace parent's ResultRelInfo with ours */