mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
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
This commit is contained in:
@ -1285,13 +1285,13 @@ get_relation_statistics(RelOptInfo *rel, Relation relation)
|
||||
|
||||
htup = SearchSysCache1(STATEXTOID, ObjectIdGetDatum(statOid));
|
||||
if (!htup)
|
||||
elog(ERROR, "cache lookup failed for statistics %u", statOid);
|
||||
elog(ERROR, "cache lookup failed for statistics object %u", statOid);
|
||||
staForm = (Form_pg_statistic_ext) GETSTRUCT(htup);
|
||||
|
||||
/*
|
||||
* First, build the array of columns covered. This is ultimately
|
||||
* wasted if no stats are actually built, but it doesn't seem worth
|
||||
* troubling over that case.
|
||||
* wasted if no stats within the object have actually been built, but
|
||||
* it doesn't seem worth troubling over that case.
|
||||
*/
|
||||
for (i = 0; i < staForm->stxkeys.dim1; i++)
|
||||
keys = bms_add_member(keys, staForm->stxkeys.values[i]);
|
||||
|
Reference in New Issue
Block a user