Fix typos in comment and log message.
This commit is contained in:
parent
6275f5d28a
commit
9e0e5550c5
|
@ -5104,7 +5104,7 @@ pg_publication_ownercheck(Oid pub_oid, Oid roleid)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ownership check for an subscription (specified by OID).
|
* Ownership check for a subscription (specified by OID).
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
pg_subscription_ownercheck(Oid sub_oid, Oid roleid)
|
pg_subscription_ownercheck(Oid sub_oid, Oid roleid)
|
||||||
|
|
|
@ -912,7 +912,7 @@ AlterSubscriptionOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId)
|
||||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||||
errmsg("permission denied to change owner of subscription \"%s\"",
|
errmsg("permission denied to change owner of subscription \"%s\"",
|
||||||
NameStr(form->subname)),
|
NameStr(form->subname)),
|
||||||
errhint("The owner of an subscription must be a superuser.")));
|
errhint("The owner of a subscription must be a superuser.")));
|
||||||
|
|
||||||
form->subowner = newOwnerId;
|
form->subowner = newOwnerId;
|
||||||
CatalogTupleUpdate(rel, &tup->t_self, tup);
|
CatalogTupleUpdate(rel, &tup->t_self, tup);
|
||||||
|
|
|
@ -105,7 +105,7 @@ ALTER SUBSCRIPTION testsub_foo RENAME TO testsub;
|
||||||
-- fail - new owner must be superuser
|
-- fail - new owner must be superuser
|
||||||
ALTER SUBSCRIPTION testsub OWNER TO regress_subscription_user2;
|
ALTER SUBSCRIPTION testsub OWNER TO regress_subscription_user2;
|
||||||
ERROR: permission denied to change owner of subscription "testsub"
|
ERROR: permission denied to change owner of subscription "testsub"
|
||||||
HINT: The owner of an subscription must be a superuser.
|
HINT: The owner of a subscription must be a superuser.
|
||||||
ALTER ROLE regress_subscription_user2 SUPERUSER;
|
ALTER ROLE regress_subscription_user2 SUPERUSER;
|
||||||
-- now it works
|
-- now it works
|
||||||
ALTER SUBSCRIPTION testsub OWNER TO regress_subscription_user2;
|
ALTER SUBSCRIPTION testsub OWNER TO regress_subscription_user2;
|
||||||
|
|
Loading…
Reference in New Issue