Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> Thanks in advance. Zoltan
You're welcome ;-)
regards, tom lane
*** src/backend/executor/nodeAppend.c.orig Thu Mar 22 01:16:12 2001
--- src/backend/executor/nodeAppend.c Tue May 8 15:48:02 2001
***************
*** 8,14 **** * * * IDENTIFICATION
! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.40 2001/03/22 06:16:12
momjianExp $ * *------------------------------------------------------------------------- */
--- 8,14 ---- * * * IDENTIFICATION
! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.40.2.1 2001/05/08 19:48:02
tglExp $ * *------------------------------------------------------------------------- */
***************
*** 362,375 **** for (i = 0; i < nplans; i++) {
! Plan *rescanNode;
! appendstate->as_whichplan = i;
! rescanNode = (Plan *) nth(i, node->appendplans);
! if (rescanNode->chgParam == NULL) { exec_append_initialize_next(node);
! ExecReScan((Plan *) rescanNode, exprCtxt, (Plan *) node); } } appendstate->as_whichplan =
0;
--- 362,386 ---- for (i = 0; i < nplans; i++) {
! Plan *subnode;
! subnode = (Plan *) nth(i, node->appendplans);
! /*
! * ExecReScan doesn't know about my subplans, so I have to do
! * changed-parameter signaling myself.
! */
! if (node->plan.chgParam != NULL)
! SetChangedParamList(subnode, node->plan.chgParam);
! /*
! * if chgParam of subnode is not null then plan will be re-scanned by
! * first ExecProcNode.
! */
! if (subnode->chgParam == NULL) {
+ /* make sure estate is correct for this subnode (needed??) */
+ appendstate->as_whichplan = i; exec_append_initialize_next(node);
! ExecReScan(subnode, exprCtxt, (Plan *) node); } } appendstate->as_whichplan = 0;
*** src/backend/executor/nodeSubqueryscan.c.orig Thu Mar 22 01:16:13 2001
--- src/backend/executor/nodeSubqueryscan.c Tue May 8 15:48:02 2001
***************
*** 12,18 **** * * * IDENTIFICATION
! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/nodeSubqueryscan.c,v 1.6 2001/03/22 06:16:13
momjianExp $ * *------------------------------------------------------------------------- */
--- 12,18 ---- * * * IDENTIFICATION
! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/nodeSubqueryscan.c,v 1.6.2.1 2001/05/08
19:48:02tgl Exp $ * *------------------------------------------------------------------------- */
***************
*** 267,273 **** return; }
! ExecReScan(node->subplan, NULL, node->subplan); subquerystate->csstate.css_ScanTupleSlot = NULL; }
--- 267,284 ---- return; }
! /*
! * ExecReScan doesn't know about my subplan, so I have to do
! * changed-parameter signaling myself.
! */
! if (node->scan.plan.chgParam != NULL)
! SetChangedParamList(node->subplan, node->scan.plan.chgParam);
! /*
! * if chgParam of subnode is not null then plan will be re-scanned by
! * first ExecProcNode.
! */
! if (node->subplan->chgParam == NULL)
! ExecReScan(node->subplan, NULL, node->subplan); subquerystate->csstate.css_ScanTupleSlot = NULL; }