aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/print.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/nodes/print.c
parent04ce41ca622c40c0501de1e31cf888f64f1736bf (diff)
downloadpostgresql-4a8c5d0375f17d8d961a280cbb640996aaa8bf0d.tar.gz
postgresql-4a8c5d0375f17d8d961a280cbb640996aaa8bf0d.zip
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/nodes/print.c')
-rw-r--r--src/backend/nodes/print.c52
1 files changed, 41 insertions, 11 deletions
diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c
index 35bb99b62fd..3e5b5bb78fc 100644
--- a/src/backend/nodes/print.c
+++ b/src/backend/nodes/print.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.74 2005/04/06 16:34:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.75 2005/04/19 22:35:15 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -493,12 +493,20 @@ plannode_type(Plan *p)
return "RESULT";
case T_Append:
return "APPEND";
+ case T_BitmapAnd:
+ return "BITMAPAND";
+ case T_BitmapOr:
+ return "BITMAPOR";
case T_Scan:
return "SCAN";
case T_SeqScan:
return "SEQSCAN";
case T_IndexScan:
return "INDEXSCAN";
+ case T_BitmapIndexScan:
+ return "BITMAPINDEXSCAN";
+ case T_BitmapHeapScan:
+ return "BITMAPHEAPSCAN";
case T_TidScan:
return "TIDSCAN";
case T_SubqueryScan:
@@ -551,7 +559,8 @@ print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label)
p->startup_cost, p->total_cost,
p->plan_rows, p->plan_width);
if (IsA(p, Scan) ||
- IsA(p, SeqScan))
+ IsA(p, SeqScan) ||
+ IsA(p, BitmapHeapScan))
{
RangeTblEntry *rte;
@@ -584,27 +593,48 @@ print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label)
if (IsA(p, Append))
{
ListCell *l;
- int whichplan = 0;
Append *appendplan = (Append *) p;
foreach(l, appendplan->appendplans)
{
Plan *subnode = (Plan *) lfirst(l);
- /*
- * I don't think we need to fiddle with the range table here,
- * bjm
- */
print_plan_recursive(subnode, parsetree, indentLevel + 3, "a: ");
+ }
+ }
+
+ if (IsA(p, BitmapAnd))
+ {
+ ListCell *l;
+ BitmapAnd *bitmapandplan = (BitmapAnd *) p;
+
+ foreach(l, bitmapandplan->bitmapplans)
+ {
+ Plan *subnode = (Plan *) lfirst(l);
- whichplan++;
+ print_plan_recursive(subnode, parsetree, indentLevel + 3, "a: ");
}
}
-}
-/* print_plan
- prints just the plan node types */
+ if (IsA(p, BitmapOr))
+ {
+ ListCell *l;
+ BitmapOr *bitmaporplan = (BitmapOr *) p;
+ foreach(l, bitmaporplan->bitmapplans)
+ {
+ Plan *subnode = (Plan *) lfirst(l);
+
+ print_plan_recursive(subnode, parsetree, indentLevel + 3, "a: ");
+ }
+ }
+}
+
+/*
+ * print_plan
+ *
+ * prints just the plan node types
+ */
void
print_plan(Plan *p, Query *parsetree)
{