summaryrefslogtreecommitdiff
path: root/src/backend/tcop/utility.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-15 11:38:58 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-15 11:43:34 +0200
commit9ec0b29976b6d73cc08880842caa0db286e46bd4 (patch)
tree83032339a1e5c557f7048caa5c1c1bb9b1213f52 /src/backend/tcop/utility.c
parent4bd91912987d794c48dd4ba4c337906bd23759be (diff)
CREATE STATISTICS: improve misleading error message
The previous change (commit f225473cbae) was still not on target, because it talked about relation kinds, which are not what is being checked here. Provide a more accurate message. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CACJufxEZ48toGH0Em_6vdsT57Y3L8pLF=DZCQ_gCii6=C3MeXw@mail.gmail.com
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r--src/backend/tcop/utility.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 5f442bc3bd4..918db53dd5e 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -1874,8 +1874,7 @@ ProcessUtilitySlow(ParseState *pstate,
if (!IsA(rel, RangeVar))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot create statistics on the specified relation"),
- errdetail("CREATE STATISTICS only supports tables, foreign tables and materialized views.")));
+ errmsg("CREATE STATISTICS only supports relation names in the FROM clause")));
/*
* CREATE STATISTICS will influence future execution plans