From 2cf9cf5d7b5e66202389618a4c08945da352b35c Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 29 Sep 2021 15:29:45 +0900 Subject: Clarify use of "statistics objects" in the code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code inconsistently used "statistic object" or "statistics" where the correct term, as discussed, is actually "statistics object". This improves the state of the code to be more consistent. While on it, fix an incorrect error message introduced in a4d75c8. This error should never happen, as the code states, but it would be misleading. Author: Justin Pryzby Reviewed-by: Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/20210924215827.GS831@telsasoft.com Backpatch-through: 14 --- src/backend/commands/tablecmds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/tablecmds.c') diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 36df38b0f8d..762f431ab88 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -12465,13 +12465,13 @@ RememberStatisticsForRebuilding(Oid stxoid, AlteredTableInfo *tab) /* * This de-duplication check is critical for two independent reasons: we * mustn't try to recreate the same statistics object twice, and if the - * statistics depends on more than one column whose type is to be altered, - * we must capture its definition string before applying any of the type - * changes. ruleutils.c will get confused if we ask again later. + * statistics object depends on more than one column whose type is to be + * altered, we must capture its definition string before applying any of + * the type changes. ruleutils.c will get confused if we ask again later. */ if (!list_member_oid(tab->changedStatisticsOids, stxoid)) { - /* OK, capture the index's existing definition string */ + /* OK, capture the statistics object's existing definition string */ char *defstring = pg_get_statisticsobjdef_string(stxoid); tab->changedStatisticsOids = lappend_oid(tab->changedStatisticsOids, -- cgit v1.2.3