aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-03-28 22:59:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-03-28 22:59:34 +0000
commitb78f6264eba33e2966447572b8261e353df01e59 (patch)
tree1b5cfa84c32c6683851d335cfa9cd7dab54ecee5 /src/backend/optimizer/util/pathnode.c
parenta760893dbda9934e287789d54bbd3c4ca3914ce0 (diff)
downloadpostgresql-b78f6264eba33e2966447572b8261e353df01e59.tar.gz
postgresql-b78f6264eba33e2966447572b8261e353df01e59.zip
Rework join-removal logic as per recent discussion. In particular this
fixes things so that it works for cases where nested removals are possible. The overhead of the optimization should be significantly less, as well.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r--src/backend/optimizer/util/pathnode.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index a2ebe0d8ed3..61716e464dc 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.157 2010/02/26 02:00:47 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.158 2010/03/28 22:59:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1215,26 +1215,6 @@ distinct_col_search(int colno, List *colnos, List *opids)
}
/*
- * create_noop_path
- * Creates a path equivalent to the input subpath, but having a different
- * parent rel. This is used when a join is found to be removable.
- */
-NoOpPath *
-create_noop_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath)
-{
- NoOpPath *pathnode = makeNode(NoOpPath);
-
- pathnode->path.pathtype = T_Join; /* by convention */
- pathnode->path.parent = rel;
- pathnode->path.startup_cost = subpath->startup_cost;
- pathnode->path.total_cost = subpath->total_cost;
- pathnode->path.pathkeys = subpath->pathkeys;
- pathnode->subpath = subpath;
-
- return pathnode;
-}
-
-/*
* create_subqueryscan_path
* Creates a path corresponding to a sequential scan of a subquery,
* returning the pathnode.