summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2023-05-12 13:50:46 -0700
committerNathan Bossart <nathan@postgresql.org>2023-05-12 14:16:56 -0700
commit4d5105a684ba20bf6a98e6ae48224fe93382c040 (patch)
tree60de6c858c2d2a075f76bd49fc8afe1a565d40f5 /src/backend
parent51b2c08798867cb9788090704b37c4698b456240 (diff)
downloadpostgresql-4d5105a684ba20bf6a98e6ae48224fe93382c040.tar.gz
Improve error message for pg_create_subscription.
c3afe8cf5a updated this error message, but it didn't use the new style established in de4d456b40. Reviewed-by: Tom Lane Discussion: https://postgr.es/m/20230512203721.GA2644063%40nathanxps13.home
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/commands/subscriptioncmds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 8b3de032ee..e8b288d01c 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -611,7 +611,9 @@ CreateSubscription(ParseState *pstate, CreateSubscriptionStmt *stmt,
if (!has_privs_of_role(owner, ROLE_PG_CREATE_SUBSCRIPTION))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must have privileges of pg_create_subscription to create subscriptions")));
+ errmsg("permission denied to create subscription"),
+ errdetail("Only roles with privileges of the \"%s\" role may create subscriptions.",
+ "pg_create_subscription")));
/*
* Since a subscription is a database object, we also check for CREATE