diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-14 10:54:47 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-14 10:55:01 -0400 |
commit | f04c9a61468904b6815b2bc73a48878817766e0e (patch) | |
tree | b8eb1b9a131023b1ab0f7e151e036988d02eb8a3 /src/backend/statistics/mvdistinct.c | |
parent | 12ad38b3b4b5004001a525e0a0eda2ec45329e8e (diff) | |
download | postgresql-f04c9a61468904b6815b2bc73a48878817766e0e.tar.gz postgresql-f04c9a61468904b6815b2bc73a48878817766e0e.zip |
Standardize terminology for pg_statistic_ext entries.
Consistently refer to such an entry as a "statistics object", not just
"statistics" or "extended statistics". Previously we had a mismash of
terms, accompanied by utter confusion as to whether the term was
singular or plural. That's not only grating (at least to the ear of
a native English speaker) but could be outright misleading, eg in error
messages that seemed to be referring to multiple objects where only one
could be meant.
This commit fixes the code and a lot of comments (though I may have
missed a few). I also renamed two new SQL functions,
pg_get_statisticsextdef -> pg_get_statisticsobjdef
pg_statistic_ext_is_visible -> pg_statistics_obj_is_visible
to conform better with this terminology.
I have not touched the SGML docs other than fixing those function
names; the docs certainly need work but it seems like a separable task.
Discussion: https://postgr.es/m/22676.1494557205@sss.pgh.pa.us
Diffstat (limited to 'src/backend/statistics/mvdistinct.c')
-rw-r--r-- | src/backend/statistics/mvdistinct.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c index f67f5762360..47b2490abbf 100644 --- a/src/backend/statistics/mvdistinct.c +++ b/src/backend/statistics/mvdistinct.c @@ -9,7 +9,7 @@ * The multivariate ndistinct coefficients address this by storing ndistinct * estimates for combinations of the user-specified columns. So for example * given a statistics object on three columns (a,b,c), this module estimates - * and store n-distinct for (a,b), (a,c), (b,c) and (a,b,c). The per-column + * and stores n-distinct for (a,b), (a,c), (b,c) and (a,b,c). The per-column * estimates are already available in pg_statistic. * * @@ -18,6 +18,7 @@ * * IDENTIFICATION * src/backend/statistics/mvdistinct.c + * *------------------------------------------------------------------------- */ #include "postgres.h" @@ -131,13 +132,13 @@ statext_ndistinct_load(Oid mvoid) htup = SearchSysCache1(STATEXTOID, ObjectIdGetDatum(mvoid)); if (!htup) - elog(ERROR, "cache lookup failed for statistics %u", mvoid); + elog(ERROR, "cache lookup failed for statistics object %u", mvoid); ndist = SysCacheGetAttr(STATEXTOID, htup, Anum_pg_statistic_ext_stxndistinct, &isnull); if (isnull) elog(ERROR, - "requested statistic kind %c not yet built for statistics %u", + "requested statistic kind %c is not yet built for statistics object %u", STATS_EXT_NDISTINCT, mvoid); ReleaseSysCache(htup); |