Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf56c12c

Browse files
committed
add index names to explain output
1 parent19da69a commitf56c12c

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

‎init.c

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ crossmatch_create_scan_state(CustomScan *node)
434434
staticvoid
435435
crossmatch_begin(CustomScanState*node,EState*estate,inteflags)
436436
{
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));
439439

440440
scan_state->ctx=ctx;
441441
setupFirstcall(ctx,scan_state->outer_idx,
@@ -448,10 +448,10 @@ crossmatch_begin(CustomScanState *node, EState *estate, int eflags)
448448
staticTupleTableSlot*
449449
crossmatch_exec(CustomScanState*node)
450450
{
451-
CrossmatchScanState*scan_state= (CrossmatchScanState*)node;
452-
TupleTableSlot*slot=node->ss.ss_ScanTupleSlot;
453-
TupleDesctupdesc=node->ss.ss_ScanTupleSlot->tts_tupleDescriptor;
454-
HeapTuplehtup=scan_state->stored_tuple;
451+
CrossmatchScanState*scan_state= (CrossmatchScanState*)node;
452+
TupleTableSlot*slot=node->ss.ss_ScanTupleSlot;
453+
TupleDesctupdesc=node->ss.ss_ScanTupleSlot->tts_tupleDescriptor;
454+
HeapTuplehtup=scan_state->stored_tuple;
455455

456456
TupleTableSlot*result;
457457

@@ -534,7 +534,20 @@ crossmatch_rescan(CustomScanState *node)
534534
staticvoid
535535
crossmatch_explain(CustomScanState*node,List*ancestors,ExplainState*es)
536536
{
537+
CrossmatchScanState*scan_state= (CrossmatchScanState*)node;
538+
StringInfoDatastr;
539+
540+
initStringInfo(&str);
537541

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);
538551
}
539552

540553
void
@@ -559,4 +572,4 @@ _PG_init(void)
559572
crossmatch_exec_methods.MarkPosCustomScan=NULL;
560573
crossmatch_exec_methods.RestrPosCustomScan=NULL;
561574
crossmatch_exec_methods.ExplainCustomScan=crossmatch_explain;
562-
}
575+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp