summaryrefslogtreecommitdiff
path: root/src/include/utils/selfuncs.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-07-01 22:07:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-07-01 22:07:23 +0000
commit08ccdf020e65d8670936317909e5c48c818eab85 (patch)
treefcd2257618e09117711cba14d4d20a8f0d4e5eb4 /src/include/utils/selfuncs.h
parentcffd89ca736e485309cd51ae056f837bd7e683ad (diff)
downloadpostgresql-08ccdf020e65d8670936317909e5c48c818eab85.tar.gz
Fix oversight in planning for multiple indexscans driven by
ScalarArrayOpExpr index quals: we were estimating the right total number of rows returned, but treating the index-access part of the cost as if a single scan were fetching that many consecutive index tuples. Actually we should treat it as a multiple indexscan, and if there are enough of 'em the Mackert-Lohman discount should kick in.
Diffstat (limited to 'src/include/utils/selfuncs.h')
-rw-r--r--src/include/utils/selfuncs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h
index 35fda0d922..065e9a5e22 100644
--- a/src/include/utils/selfuncs.h
+++ b/src/include/utils/selfuncs.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/selfuncs.h,v 1.33 2006/05/02 11:28:55 teodor Exp $
+ * $PostgreSQL: pgsql/src/include/utils/selfuncs.h,v 1.34 2006/07/01 22:07:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -151,6 +151,7 @@ extern Selectivity scalararraysel(PlannerInfo *root,
ScalarArrayOpExpr *clause,
bool is_join_clause,
int varRelid, JoinType jointype);
+extern int estimate_array_length(Node *arrayexpr);
extern Selectivity rowcomparesel(PlannerInfo *root,
RowCompareExpr *clause,
int varRelid, JoinType jointype);