summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/subselect.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-04-19 22:35:18 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-04-19 22:35:18 +0000
commit4a8c5d0375f17d8d961a280cbb640996aaa8bf0d (patch)
treed12840ac104b45911406a533274add8456300815 /src/backend/optimizer/plan/subselect.c
parent04ce41ca622c40c0501de1e31cf888f64f1736bf (diff)
downloadpostgresql-4a8c5d0375f17d8d961a280cbb640996aaa8bf0d.tar.gz
Create executor and planner-backend support for decoupled heap and index
scans, using in-memory tuple ID bitmaps as the intermediary. The planner frontend (path creation and cost estimation) is not there yet, so none of this code can be executed. I have tested it using some hacked planner code that is far too ugly to see the light of day, however. Committing now so that the bulk of the infrastructure changes go in before the tree drifts under me.
Diffstat (limited to 'src/backend/optimizer/plan/subselect.c')
-rw-r--r--src/backend/optimizer/plan/subselect.c48
1 files changed, 47 insertions, 1 deletions
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c
index f1519569a8..7f5a4fde63 100644
--- a/src/backend/optimizer/plan/subselect.c
+++ b/src/backend/optimizer/plan/subselect.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.96 2005/04/11 23:06:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.97 2005/04/19 22:35:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1037,6 +1037,20 @@ finalize_plan(Plan *plan, List *rtable,
*/
break;
+ case T_BitmapIndexScan:
+ finalize_primnode((Node *) ((BitmapIndexScan *) plan)->indxqual,
+ &context);
+ /*
+ * we need not look at indxqualorig, since it will have the
+ * same param references as indxqual.
+ */
+ break;
+
+ case T_BitmapHeapScan:
+ finalize_primnode((Node *) ((BitmapHeapScan *) plan)->bitmapqualorig,
+ &context);
+ break;
+
case T_TidScan:
finalize_primnode((Node *) ((TidScan *) plan)->tideval,
&context);
@@ -1082,6 +1096,38 @@ finalize_plan(Plan *plan, List *rtable,
}
break;
+ case T_BitmapAnd:
+ {
+ ListCell *l;
+
+ foreach(l, ((BitmapAnd *) plan)->bitmapplans)
+ {
+ context.paramids =
+ bms_add_members(context.paramids,
+ finalize_plan((Plan *) lfirst(l),
+ rtable,
+ outer_params,
+ valid_params));
+ }
+ }
+ break;
+
+ case T_BitmapOr:
+ {
+ ListCell *l;
+
+ foreach(l, ((BitmapOr *) plan)->bitmapplans)
+ {
+ context.paramids =
+ bms_add_members(context.paramids,
+ finalize_plan((Plan *) lfirst(l),
+ rtable,
+ outer_params,
+ valid_params));
+ }
+ }
+ break;
+
case T_NestLoop:
finalize_primnode((Node *) ((Join *) plan)->joinqual,
&context);