From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kovacs Zoltan <kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: incorrect query result using complex structures (views?) |
Date: | 2001-05-08 19:51:54 |
Message-ID: | 7655.989351514@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kovacs Zoltan <kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)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 momjian Exp $
*
*-------------------------------------------------------------------------
*/
--- 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 tgl Exp $
*
*-------------------------------------------------------------------------
*/
***************
*** 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 momjian Exp $
*
*-------------------------------------------------------------------------
*/
--- 12,18 ----
*
*
* IDENTIFICATION
! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/nodeSubqueryscan.c,v 1.6.2.1 2001/05/08 19:48:02 tgl 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;
}
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-05-08 19:57:24 | Outstanding patches |
Previous Message | Bruce Momjian | 2001-05-08 19:29:22 | Re: Lisp as procedural language |