diff options
Diffstat (limited to 'src/include/utils/selfuncs.h')
-rw-r--r-- | src/include/utils/selfuncs.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index f9be539602b..78cde58acc1 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -68,6 +68,20 @@ p = 1.0; \ } while (0) +/* + * A set of flags which some selectivity estimation functions can pass back to + * callers to provide further details about some assumptions which were made + * during the estimation. + */ +#define SELFLAG_USED_DEFAULT (1 << 0) /* Estimation fell back on one + * of the DEFAULTs as defined + * above. */ + +typedef struct EstimationInfo +{ + uint32 flags; /* Flags, as defined above to mark special + * properties of the estimation. */ +} EstimationInfo; /* Return data from examine_variable and friends */ typedef struct VariableStatData @@ -197,7 +211,8 @@ extern void mergejoinscansel(PlannerInfo *root, Node *clause, Selectivity *rightstart, Selectivity *rightend); extern double estimate_num_groups(PlannerInfo *root, List *groupExprs, - double input_rows, List **pgset); + double input_rows, List **pgset, + EstimationInfo *estinfo); extern void estimate_hash_bucket_stats(PlannerInfo *root, Node *hashkey, double nbuckets, |