summaryrefslogtreecommitdiff
path: root/src/include/nodes/tidbitmap.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-08-28 22:47:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-08-28 22:47:20 +0000
commit46a0eee3006b11a15b73426c8146ed5ab32e1d62 (patch)
tree84e646e836446437c7fd310fd0aaf167b561e4dc /src/include/nodes/tidbitmap.h
parent75e90bbf69efb3cee8d3af9c07d345dd9540a7cc (diff)
downloadpostgresql-46a0eee3006b11a15b73426c8146ed5ab32e1d62.tar.gz
Tweak nodeBitmapAnd to stop evaluating sub-plan scans if it finds it's
got an empty bitmap after any step; the remaining subplans can no longer affect the result. Per a suggestion from Ilia Kantor.
Diffstat (limited to 'src/include/nodes/tidbitmap.h')
-rw-r--r--src/include/nodes/tidbitmap.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/nodes/tidbitmap.h b/src/include/nodes/tidbitmap.h
index 2c90c01d81..ea5673e6f2 100644
--- a/src/include/nodes/tidbitmap.h
+++ b/src/include/nodes/tidbitmap.h
@@ -15,7 +15,7 @@
*
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/nodes/tidbitmap.h,v 1.1 2005/04/17 22:24:02 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/tidbitmap.h,v 1.2 2005/08/28 22:47:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,6 +49,8 @@ extern void tbm_add_tuples(TIDBitmap *tbm, const ItemPointer tids, int ntids);
extern void tbm_union(TIDBitmap *a, const TIDBitmap *b);
extern void tbm_intersect(TIDBitmap *a, const TIDBitmap *b);
+extern bool tbm_is_empty(const TIDBitmap *tbm);
+
extern void tbm_begin_iterate(TIDBitmap *tbm);
extern TBMIterateResult *tbm_iterate(TIDBitmap *tbm);