From: Álvaro Herrera Date: Thu, 21 Nov 2024 09:54:30 +0000 (+0100) Subject: Unify repetitive error messages X-Git-Tag: REL_18_BETA1~1453 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=da94e871e8877d1f1054277b24b604bf1c0036a6;p=postgresql.git Unify repetitive error messages --- 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)