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

Commitcc3e9de

Browse files
committed
The shortcut exit that I recently added to ExecInitIndexScan() for
EXPLAIN-only operation was a little too short; it skipped initializing thenode's result tuple type, which may be needed depending on what's above theindexscan node. Call ExecAssignResultTypeFromTL before exiting. (For goodluck I moved up the ExecAssignScanProjectionInfo call as well, so thateverything except indexscan-specific initialization will still be done.)Per example from Grant Finnemore.
1 parent10f719a commitcc3e9de

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/backend/executor/nodeIndexscan.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.122 2007/05/25 17:54:25 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.123 2007/05/31 20:45:26 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -522,6 +522,12 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags)
522522
*/
523523
ExecAssignScanType(&indexstate->ss,RelationGetDescr(currentRelation));
524524

525+
/*
526+
* Initialize result tuple type and projection info.
527+
*/
528+
ExecAssignResultTypeFromTL(&indexstate->ss.ps);
529+
ExecAssignScanProjectionInfo(&indexstate->ss);
530+
525531
/*
526532
* If we are just doing EXPLAIN (ie, aren't going to run the plan),
527533
* stop here. This allows an index-advisor plugin to EXPLAIN a plan
@@ -589,12 +595,6 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags)
589595
indexstate->iss_NumScanKeys,
590596
indexstate->iss_ScanKeys);
591597

592-
/*
593-
* Initialize result tuple type and projection info.
594-
*/
595-
ExecAssignResultTypeFromTL(&indexstate->ss.ps);
596-
ExecAssignScanProjectionInfo(&indexstate->ss);
597-
598598
/*
599599
* all done.
600600
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp