1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Be more realistic about plans involving Materialize nodes: take their

cost into account while planning.
This commit is contained in:
Tom Lane
2002-11-30 05:21:03 +00:00
parent 829cedc8cf
commit 935969415a
19 changed files with 320 additions and 160 deletions

View File

@@ -20,7 +20,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.169 2002/11/25 21:29:36 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.170 2002/11/30 05:21:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -456,6 +456,16 @@ _equalResultPath(ResultPath *a, ResultPath *b)
return true;
}
static bool
_equalMaterialPath(MaterialPath *a, MaterialPath *b)
{
if (!_equalPath((Path *) a, (Path *) b))
return false;
COMPARE_NODE_FIELD(subpath);
return true;
}
static bool
_equalJoinPath(JoinPath *a, JoinPath *b)
{
@@ -1704,12 +1714,27 @@ equal(void *a, void *b)
case T_RelOptInfo:
retval = _equalRelOptInfo(a, b);
break;
case T_IndexOptInfo:
retval = _equalIndexOptInfo(a, b);
break;
case T_Path:
retval = _equalPath(a, b);
break;
case T_IndexPath:
retval = _equalIndexPath(a, b);
break;
case T_TidPath:
retval = _equalTidPath(a, b);
break;
case T_AppendPath:
retval = _equalAppendPath(a, b);
break;
case T_ResultPath:
retval = _equalResultPath(a, b);
break;
case T_MaterialPath:
retval = _equalMaterialPath(a, b);
break;
case T_NestPath:
retval = _equalNestPath(a, b);
break;
@@ -1731,18 +1756,6 @@ equal(void *a, void *b)
case T_InnerIndexscanInfo:
retval = _equalInnerIndexscanInfo(a, b);
break;
case T_TidPath:
retval = _equalTidPath(a, b);
break;
case T_AppendPath:
retval = _equalAppendPath(a, b);
break;
case T_ResultPath:
retval = _equalResultPath(a, b);
break;
case T_IndexOptInfo:
retval = _equalIndexOptInfo(a, b);
break;
case T_List:
{