summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2011-09-04 19:41:49 +0000
committerTom Lane2011-09-04 19:41:49 +0000
commit4c2777d0b733220d9029f78817af8ce671e4a5ad (patch)
treeed2001e3d7e99d05a77fbf1dac278a21fad853e4 /src/include
parent1cb108efb0e60d87e4adec38e7636b6e8efbeb57 (diff)
Change get_variable_numdistinct's API to flag default estimates explicitly.
Formerly, callers tested for DEFAULT_NUM_DISTINCT, which had the problem that a perfectly solid estimate might be mistaken for a content-free default.
Diffstat (limited to 'src/include')
-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 4208588c2eb..32d14b60290 100644
--- a/src/include/utils/selfuncs.h
+++ b/src/include/utils/selfuncs.h
@@ -121,7 +121,8 @@ extern void get_join_variables(PlannerInfo *root, List *args,
VariableStatData *vardata1,
VariableStatData *vardata2,
bool *join_is_reversed);
-extern double get_variable_numdistinct(VariableStatData *vardata);
+extern double get_variable_numdistinct(VariableStatData *vardata,
+ bool *isdefault);
extern double mcv_selectivity(VariableStatData *vardata, FmgrInfo *opproc,
Datum constval, bool varonleft,
double *sumcommonp);