mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Be more realistic about plans involving Materialize nodes: take their
cost into account while planning.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.224 2002/11/30 00:08:16 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.225 2002/11/30 05:21:01 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1142,6 +1142,27 @@ _copyResultPath(ResultPath *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copyMaterialPath
|
||||
*/
|
||||
static MaterialPath *
|
||||
_copyMaterialPath(MaterialPath *from)
|
||||
{
|
||||
MaterialPath *newnode = makeNode(MaterialPath);
|
||||
|
||||
/*
|
||||
* copy node superclass fields
|
||||
*/
|
||||
CopyPathFields((Path *) from, (Path *) newnode);
|
||||
|
||||
/*
|
||||
* copy remainder of node
|
||||
*/
|
||||
COPY_NODE_FIELD(subpath);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* CopyJoinPathFields
|
||||
*
|
||||
@ -2739,6 +2760,9 @@ copyObject(void *from)
|
||||
case T_RelOptInfo:
|
||||
retval = _copyRelOptInfo(from);
|
||||
break;
|
||||
case T_IndexOptInfo:
|
||||
retval = _copyIndexOptInfo(from);
|
||||
break;
|
||||
case T_Path:
|
||||
retval = _copyPath(from);
|
||||
break;
|
||||
@ -2754,6 +2778,9 @@ copyObject(void *from)
|
||||
case T_ResultPath:
|
||||
retval = _copyResultPath(from);
|
||||
break;
|
||||
case T_MaterialPath:
|
||||
retval = _copyMaterialPath(from);
|
||||
break;
|
||||
case T_NestPath:
|
||||
retval = _copyNestPath(from);
|
||||
break;
|
||||
@ -2772,9 +2799,6 @@ copyObject(void *from)
|
||||
case T_JoinInfo:
|
||||
retval = _copyJoinInfo(from);
|
||||
break;
|
||||
case T_IndexOptInfo:
|
||||
retval = _copyIndexOptInfo(from);
|
||||
break;
|
||||
case T_InnerIndexscanInfo:
|
||||
retval = _copyInnerIndexscanInfo(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user