diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2019-03-27 18:32:18 +0100 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2019-03-27 18:32:18 +0100 |
commit | 7300a699502fe5432b05fbc75baca534b080bebb (patch) | |
tree | 2fa5740b9cf8363068e8a575ae569ca172ffb66a /src/backend/parser/parse_utilcmd.c | |
parent | 333ed246c6f351c4e8fe22c764b97793c4101b00 (diff) | |
download | postgresql-7300a699502fe5432b05fbc75baca534b080bebb.tar.gz postgresql-7300a699502fe5432b05fbc75baca534b080bebb.zip |
Add support for multivariate MCV lists
Introduce a third extended statistic type, supported by the CREATE
STATISTICS command - MCV lists, a generalization of the statistic
already built and used for individual columns.
Compared to the already supported types (n-distinct coefficients and
functional dependencies), MCV lists are more complex, include column
values and allow estimation of much wider range of common clauses
(equality and inequality conditions, IS NULL, IS NOT NULL etc.).
Similarly to the other types, a new pseudo-type (pg_mcv_list) is used.
Author: Tomas Vondra
Reviewed-by: Dean Rasheed, David Rowley, Mark Dilger, Alvaro Herrera
Discussion: https://postgr.es/m/dfdac334-9cf2-2597-fb27-f0fb3753f435@2ndquadrant.com
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 443b70192d9..8fdd3d785c7 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -1652,6 +1652,8 @@ generateClonedExtStatsStmt(RangeVar *heapRel, Oid heapRelid, stat_types = lappend(stat_types, makeString("ndistinct")); else if (enabled[i] == STATS_EXT_DEPENDENCIES) stat_types = lappend(stat_types, makeString("dependencies")); + else if (enabled[i] == STATS_EXT_MCV) + stat_types = lappend(stat_types, makeString("mcv")); else elog(ERROR, "unrecognized statistics kind %c", enabled[i]); } |