summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-04-27 00:46:59 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-04-27 00:46:59 +0000
commita3c1a11fc1a8040b1551f76258d617aa20b67908 (patch)
tree93674b8fc83d3faf6fa1d58c2a6154d0fbfa60ef /src/include
parentf1b3d5b02d982ad4c64b55a52578130c003046f8 (diff)
If we're going to expose VariableStatData for contrib modules to use,
then we should export a reasonable set of the supporting routines too.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/selfuncs.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h
index ad484d8b492..9ba11c99ae5 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.30 2006/04/26 22:33:36 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/selfuncs.h,v 1.31 2006/04/27 00:46:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -97,6 +97,19 @@ typedef enum
/* selfuncs.c */
+extern void examine_variable(PlannerInfo *root, Node *node, int varRelid,
+ VariableStatData *vardata);
+extern bool get_restriction_variable(PlannerInfo *root, List *args,
+ int varRelid,
+ VariableStatData *vardata, Node **other,
+ bool *varonleft);
+extern void get_join_variables(PlannerInfo *root, List *args,
+ VariableStatData *vardata1,
+ VariableStatData *vardata2);
+extern double get_variable_numdistinct(VariableStatData *vardata);
+extern double mcv_selectivity(VariableStatData *vardata, FmgrInfo *opproc,
+ Datum constval, double *sumcommonp);
+
extern Pattern_Prefix_Status pattern_fixed_prefix(Const *patt,
Pattern_Type ptype,
Const **prefix,
@@ -154,8 +167,5 @@ extern Selectivity estimate_hash_bucketsize(PlannerInfo *root, Node *hashkey,
extern Datum btcostestimate(PG_FUNCTION_ARGS);
extern Datum hashcostestimate(PG_FUNCTION_ARGS);
extern Datum gistcostestimate(PG_FUNCTION_ARGS);
-extern bool get_restriction_variable(PlannerInfo *root, List *args, int varRelid,
- VariableStatData *vardata, Node **other,
- bool *varonleft);
#endif /* SELFUNCS_H */