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

Commit7028c13

Browse files
committed
Fix an oversight in two different recent patches: nodes that support SRFs
in their targetlists had better reset ps_TupFromTlist during ReScan calls.There's no need to back-patch here since nodeAgg and nodeGroup didn'teven pretend to support SRFs in prior releases.
1 parentd578901 commit7028c13

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

‎src/backend/executor/nodeAgg.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
* Portions Copyright (c) 1994, Regents of the University of California
6262
*
6363
* IDENTIFICATION
64-
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.162 2008/10/16 19:25:55 neilc Exp $
64+
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.163 2008/10/23 15:29:23 tgl Exp $
6565
*
6666
*-------------------------------------------------------------------------
6767
*/
@@ -1284,6 +1284,8 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
12841284
ExecAssignResultTypeFromTL(&aggstate->ss.ps);
12851285
ExecAssignProjectionInfo(&aggstate->ss.ps,NULL);
12861286

1287+
aggstate->ss.ps.ps_TupFromTlist= false;
1288+
12871289
/*
12881290
* get the count of aggregates in targetlist and quals
12891291
*/
@@ -1647,6 +1649,8 @@ ExecReScanAgg(AggState *node, ExprContext *exprCtxt)
16471649

16481650
node->agg_done= false;
16491651

1652+
node->ss.ps.ps_TupFromTlist= false;
1653+
16501654
if (((Agg*)node->ss.ps.plan)->aggstrategy==AGG_HASHED)
16511655
{
16521656
/*

‎src/backend/executor/nodeCtescan.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeCtescan.c,v 1.1 2008/10/04 21:56:53 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeCtescan.c,v 1.2 2008/10/23 15:29:23 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -303,11 +303,10 @@ ExecEndCteScan(CteScanState *node)
303303
void
304304
ExecCteScanReScan(CteScanState*node,ExprContext*exprCtxt)
305305
{
306-
Tuplestorestate*tuplestorestate;
307-
308-
tuplestorestate=node->leader->cte_table;
306+
Tuplestorestate*tuplestorestate=node->leader->cte_table;
309307

310308
ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
309+
node->ss.ps.ps_TupFromTlist= false;
311310

312311
if (node->leader==node)
313312
{

‎src/backend/executor/nodeGroup.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* locate group boundaries.
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/backend/executor/nodeGroup.c,v 1.71 2008/09/08 00:22:56 tgl Exp $
18+
* $PostgreSQL: pgsql/src/backend/executor/nodeGroup.c,v 1.72 2008/10/23 15:29:23 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -247,6 +247,8 @@ ExecInitGroup(Group *node, EState *estate, int eflags)
247247
ExecAssignResultTypeFromTL(&grpstate->ss.ps);
248248
ExecAssignProjectionInfo(&grpstate->ss.ps,NULL);
249249

250+
grpstate->ss.ps.ps_TupFromTlist= false;
251+
250252
/*
251253
* Precompute fmgr lookup data for inner loop
252254
*/
@@ -286,6 +288,7 @@ void
286288
ExecReScanGroup(GroupState*node,ExprContext*exprCtxt)
287289
{
288290
node->grp_done= FALSE;
291+
node->ss.ps.ps_TupFromTlist= false;
289292
/* must clear first tuple */
290293
ExecClearTuple(node->ss.ss_ScanTupleSlot);
291294

‎src/backend/executor/nodeWorktablescan.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeWorktablescan.c,v 1.2 2008/10/13 00:41:40 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeWorktablescan.c,v 1.3 2008/10/23 15:29:23 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -204,6 +204,8 @@ void
204204
ExecWorkTableScanReScan(WorkTableScanState*node,ExprContext*exprCtxt)
205205
{
206206
ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
207+
node->ss.ps.ps_TupFromTlist= false;
208+
207209
/* No need (or way) to rescan if ExecWorkTableScan not called yet */
208210
if (node->rustate)
209211
tuplestore_rescan(node->rustate->working_table);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp