Skip to content

Commit da94e87

Browse files
committed
Unify repetitive error messages
1 parent ea792bf commit da94e87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/commands/explain.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
287287
if (es->wal && !es->analyze)
288288
ereport(ERROR,
289289
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
290-
errmsg("EXPLAIN option WAL requires ANALYZE")));
290+
errmsg("EXPLAIN option %s requires ANALYZE", "WAL")));
291291

292292
/* if the timing was not set explicitly, set default value */
293293
es->timing = (timing_set) ? es->timing : es->analyze;
@@ -296,13 +296,13 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
296296
if (es->timing && !es->analyze)
297297
ereport(ERROR,
298298
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
299-
errmsg("EXPLAIN option TIMING requires ANALYZE")));
299+
errmsg("EXPLAIN option %s requires ANALYZE", "TIMING")));
300300

301301
/* check that serialize is used with EXPLAIN ANALYZE */
302302
if (es->serialize != EXPLAIN_SERIALIZE_NONE && !es->analyze)
303303
ereport(ERROR,
304304
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
305-
errmsg("EXPLAIN option SERIALIZE requires ANALYZE")));
305+
errmsg("EXPLAIN option %s requires ANALYZE", "SERIALIZE")));
306306

307307
/* check that GENERIC_PLAN is not used with EXPLAIN ANALYZE */
308308
if (es->generic && es->analyze)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy