aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/vacuum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/vacuum.c')
-rw-r--r--src/backend/commands/vacuum.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index baf66f1e6c0..85b04832479 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -180,7 +180,10 @@ vacuum(int options, RangeVar *relation, Oid relid, VacuumParams *params,
* calls a hostile index expression that itself calls ANALYZE.
*/
if (in_vacuum)
- elog(ERROR, "%s cannot be executed from VACUUM or ANALYZE", stmttype);
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("%s cannot be executed from VACUUM or ANALYZE",
+ stmttype)));
/*
* Send info about dead objects to the statistics collector, unless we are