Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+3-3
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)