aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorÁlvaro Herrera <alvherre@alvh.no-ip.org>2024-11-21 10:54:30 +0100
committerÁlvaro Herrera <alvherre@alvh.no-ip.org>2024-11-21 10:54:30 +0100
commitda94e871e8877d1f1054277b24b604bf1c0036a6 (patch)
tree1b5002ad0718072a42de97d2e85c424806a13340 /src/backend/commands/explain.c
parentea792bfd93ab8ad4ef4e3d1a741b8595db143677 (diff)
downloadpostgresql-da94e871e8877d1f1054277b24b604bf1c0036a6.tar.gz
postgresql-da94e871e8877d1f1054277b24b604bf1c0036a6.zip
Unify repetitive error messages
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 7c0fd63b2f0..a3f1d53d7a5 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -287,7 +287,7 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
if (es->wal && !es->analyze)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("EXPLAIN option WAL requires ANALYZE")));
+ errmsg("EXPLAIN option %s requires ANALYZE", "WAL")));
/* if the timing was not set explicitly, set default value */
es->timing = (timing_set) ? es->timing : es->analyze;
@@ -296,13 +296,13 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
if (es->timing && !es->analyze)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("EXPLAIN option TIMING requires ANALYZE")));
+ errmsg("EXPLAIN option %s requires ANALYZE", "TIMING")));
/* check that serialize is used with EXPLAIN ANALYZE */
if (es->serialize != EXPLAIN_SERIALIZE_NONE && !es->analyze)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("EXPLAIN option SERIALIZE requires ANALYZE")));
+ errmsg("EXPLAIN option %s requires ANALYZE", "SERIALIZE")));
/* check that GENERIC_PLAN is not used with EXPLAIN ANALYZE */
if (es->generic && es->analyze)