aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/bitmapset.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-06-29 23:05:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-06-29 23:05:05 +0000
commit835bb975d8d11268582d9dbd26b0eeaa62b60632 (patch)
tree5d5d3d57acfe7627235aa72c28c37d8c85b210a3 /src/include/nodes/bitmapset.h
parentcf883ea95c4bad69910300cbd6c0ef5cb84a9178 (diff)
downloadpostgresql-835bb975d8d11268582d9dbd26b0eeaa62b60632.tar.gz
postgresql-835bb975d8d11268582d9dbd26b0eeaa62b60632.zip
Restructure building of join relation targetlists so that a join plan
node emits only those vars that are actually needed above it in the plan tree. (There were comments in the code suggesting that this was done at some point in the dim past, but for a long time we have just made join nodes emit everything that either input emitted.) Aside from being marginally more efficient, this fixes the problem noted by Peter Eisentraut where a join above an IN-implemented-as-join might fail, because the subplan targetlist constructed in the latter case didn't meet the expectation of including everything. Along the way, fix some places that were O(N^2) in the targetlist length. This is not all the trouble spots for wide queries by any means, but it's a step forward.
Diffstat (limited to 'src/include/nodes/bitmapset.h')
-rw-r--r--src/include/nodes/bitmapset.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/nodes/bitmapset.h b/src/include/nodes/bitmapset.h
index 4e06d7a284a..7974c44aae7 100644
--- a/src/include/nodes/bitmapset.h
+++ b/src/include/nodes/bitmapset.h
@@ -13,7 +13,7 @@
*
* Copyright (c) 2003, PostgreSQL Global Development Group
*
- * $Id: bitmapset.h,v 1.1 2003/02/08 20:20:55 tgl Exp $
+ * $Id: bitmapset.h,v 1.2 2003/06/29 23:05:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,6 +59,7 @@ extern Bitmapset *bms_difference(const Bitmapset *a, const Bitmapset *b);
extern bool bms_is_subset(const Bitmapset *a, const Bitmapset *b);
extern bool bms_is_member(int x, const Bitmapset *a);
extern bool bms_overlap(const Bitmapset *a, const Bitmapset *b);
+extern bool bms_nonempty_difference(const Bitmapset *a, const Bitmapset *b);
extern int bms_singleton_member(const Bitmapset *a);
extern int bms_num_members(const Bitmapset *a);
/* optimized tests when we don't need to know exact membership count: */