mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user