aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-04-21 19:18:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-04-21 19:18:13 +0000
commit14c7fba3f7d0769d8a063dea2854693f35535f6a (patch)
tree51b519e88e8092e6fc9cdd6bf50dbff872bc6fa6 /src/backend/nodes/outfuncs.c
parentc6221db3c0f7049b804391d59aeadcfbd1f51800 (diff)
downloadpostgresql-14c7fba3f7d0769d8a063dea2854693f35535f6a.tar.gz
postgresql-14c7fba3f7d0769d8a063dea2854693f35535f6a.zip
Rethink original decision to use AND/OR Expr nodes to represent bitmap
logic operations during planning. Seems cleaner to create two new Path node types, instead --- this avoids duplication of cost-estimation code. Also, create an enable_bitmapscan GUC parameter to control use of bitmap plans.
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 1ea59314ea2..c1c6ac09f48 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.248 2005/04/21 02:28:01 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.249 2005/04/21 19:18:12 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -1042,6 +1042,28 @@ _outBitmapHeapPath(StringInfo str, BitmapHeapPath *node)
}
static void
+_outBitmapAndPath(StringInfo str, BitmapAndPath *node)
+{
+ WRITE_NODE_TYPE("BITMAPANDPATH");
+
+ _outPathInfo(str, (Path *) node);
+
+ WRITE_NODE_FIELD(bitmapquals);
+ WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
+}
+
+static void
+_outBitmapOrPath(StringInfo str, BitmapOrPath *node)
+{
+ WRITE_NODE_TYPE("BITMAPORPATH");
+
+ _outPathInfo(str, (Path *) node);
+
+ WRITE_NODE_FIELD(bitmapquals);
+ WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
+}
+
+static void
_outTidPath(StringInfo str, TidPath *node)
{
WRITE_NODE_TYPE("TIDPATH");
@@ -1853,6 +1875,12 @@ _outNode(StringInfo str, void *obj)
case T_BitmapHeapPath:
_outBitmapHeapPath(str, obj);
break;
+ case T_BitmapAndPath:
+ _outBitmapAndPath(str, obj);
+ break;
+ case T_BitmapOrPath:
+ _outBitmapOrPath(str, obj);
+ break;
case T_TidPath:
_outTidPath(str, obj);
break;