mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Clarify use of "statistics objects" in the code
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
This commit is contained in:
@ -2892,7 +2892,7 @@ transformIndexStmt(Oid relid, IndexStmt *stmt, const char *queryString)
|
||||
/*
|
||||
* transformStatsStmt - parse analysis for CREATE STATISTICS
|
||||
*
|
||||
* To avoid race conditions, it's important that this function rely only on
|
||||
* To avoid race conditions, it's important that this function relies only on
|
||||
* the passed-in relid (and not on stmt->relation) to determine the target
|
||||
* relation.
|
||||
*/
|
||||
@ -2948,7 +2948,7 @@ transformStatsStmt(Oid relid, CreateStatsStmt *stmt, const char *queryString)
|
||||
if (list_length(pstate->p_rtable) != 1)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
|
||||
errmsg("statistics expressions can refer only to the table being indexed")));
|
||||
errmsg("statistics expressions can refer only to the table being referenced")));
|
||||
|
||||
free_parsestate(pstate);
|
||||
|
||||
@ -3615,7 +3615,7 @@ transformAlterTableStmt(Oid relid, AlterTableStmt *stmt,
|
||||
newcmds = lappend(newcmds, newcmd);
|
||||
}
|
||||
|
||||
/* Append extended statistic objects */
|
||||
/* Append extended statistics objects */
|
||||
transformExtendedStatistics(&cxt);
|
||||
|
||||
/* Close rel */
|
||||
|
Reference in New Issue
Block a user