@@ -434,8 +434,8 @@ crossmatch_create_scan_state(CustomScan *node)
434
434
static void
435
435
crossmatch_begin (CustomScanState * node ,EState * estate ,int eflags )
436
436
{
437
- CrossmatchScanState * scan_state = (CrossmatchScanState * )node ;
438
- CrossmatchContext * ctx = (CrossmatchContext * )palloc0 (sizeof (CrossmatchContext ));
437
+ CrossmatchScanState * scan_state = (CrossmatchScanState * )node ;
438
+ CrossmatchContext * ctx = (CrossmatchContext * )palloc0 (sizeof (CrossmatchContext ));
439
439
440
440
scan_state -> ctx = ctx ;
441
441
setupFirstcall (ctx ,scan_state -> outer_idx ,
@@ -448,10 +448,10 @@ crossmatch_begin(CustomScanState *node, EState *estate, int eflags)
448
448
static TupleTableSlot *
449
449
crossmatch_exec (CustomScanState * node )
450
450
{
451
- CrossmatchScanState * scan_state = (CrossmatchScanState * )node ;
452
- TupleTableSlot * slot = node -> ss .ss_ScanTupleSlot ;
453
- TupleDesc tupdesc = node -> ss .ss_ScanTupleSlot -> tts_tupleDescriptor ;
454
- HeapTuple htup = scan_state -> stored_tuple ;
451
+ CrossmatchScanState * scan_state = (CrossmatchScanState * )node ;
452
+ TupleTableSlot * slot = node -> ss .ss_ScanTupleSlot ;
453
+ TupleDesc tupdesc = node -> ss .ss_ScanTupleSlot -> tts_tupleDescriptor ;
454
+ HeapTuple htup = scan_state -> stored_tuple ;
455
455
456
456
TupleTableSlot * result ;
457
457
@@ -534,7 +534,20 @@ crossmatch_rescan(CustomScanState *node)
534
534
static void
535
535
crossmatch_explain (CustomScanState * node ,List * ancestors ,ExplainState * es )
536
536
{
537
+ CrossmatchScanState * scan_state = (CrossmatchScanState * )node ;
538
+ StringInfoData str ;
539
+
540
+ initStringInfo (& str );
537
541
542
+ appendStringInfo (& str ,"%s" ,
543
+ get_rel_name (scan_state -> outer_idx ));
544
+ ExplainPropertyText ("Outer index" ,str .data ,es );
545
+
546
+ resetStringInfo (& str );
547
+
548
+ appendStringInfo (& str ,"%s" ,
549
+ get_rel_name (scan_state -> inner_idx ));
550
+ ExplainPropertyText ("Inner index" ,str .data ,es );
538
551
}
539
552
540
553
void
@@ -559,4 +572,4 @@ _PG_init(void)
559
572
crossmatch_exec_methods .MarkPosCustomScan = NULL ;
560
573
crossmatch_exec_methods .RestrPosCustomScan = NULL ;
561
574
crossmatch_exec_methods .ExplainCustomScan = crossmatch_explain ;
562
- }
575
+ }