InvalidAttrNumber,
Anum_pg_publication_pubowner,
InvalidAttrNumber,
- -1,
+ ACL_KIND_PUBLICATION,
true
},
{
InvalidAttrNumber,
Anum_pg_subscription_subowner,
InvalidAttrNumber,
- -1,
+ ACL_KIND_SUBSCRIPTION,
true
}
};
-- PUBLICATION
--
CREATE ROLE regress_publication_user LOGIN SUPERUSER;
+CREATE ROLE regress_publication_user_dummy LOGIN NOSUPERUSER;
SET SESSION AUTHORIZATION 'regress_publication_user';
CREATE PUBLICATION testpub_default;
CREATE PUBLICATION testpib_ins_trunct WITH (nopublish delete, nopublish update);
t | t | t
(1 row)
+-- faile - must be owner of publication
+SET ROLE regress_publication_user_dummy;
+ALTER PUBLICATION testpub_default RENAME TO testpub_dummy;
+ERROR: must be owner of publication testpub_default
+RESET ROLE;
ALTER PUBLICATION testpub_default RENAME TO testpub_foo;
\dRp testpub_foo
List of publications
NOTICE: drop cascades to table pub_test.testpub_nopk
RESET SESSION AUTHORIZATION;
DROP ROLE regress_publication_user;
+DROP ROLE regress_publication_user_dummy;
-- SUBSCRIPTION
--
CREATE ROLE regress_subscription_user LOGIN SUPERUSER;
+CREATE ROLE regress_subscription_user_dummy LOGIN NOSUPERUSER;
SET SESSION AUTHORIZATION 'regress_subscription_user';
-- fail - no publications
CREATE SUBSCRIPTION testsub CONNECTION 'foo';
(1 row)
COMMIT;
+-- fail - must be owner of subscription
+SET ROLE regress_subscription_user_dummy;
+ALTER SUBSCRIPTION testsub RENAME TO testsub_dummy;
+ERROR: must be owner of subscription testsub
+RESET ROLE;
ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
\dRs
List of subscriptions
COMMIT;
RESET SESSION AUTHORIZATION;
DROP ROLE regress_subscription_user;
+DROP ROLE regress_subscription_user_dummy;
-- PUBLICATION
--
CREATE ROLE regress_publication_user LOGIN SUPERUSER;
+CREATE ROLE regress_publication_user_dummy LOGIN NOSUPERUSER;
SET SESSION AUTHORIZATION 'regress_publication_user';
CREATE PUBLICATION testpub_default;
\dRp+ testpub_default
+-- faile - must be owner of publication
+SET ROLE regress_publication_user_dummy;
+ALTER PUBLICATION testpub_default RENAME TO testpub_dummy;
+RESET ROLE;
+
ALTER PUBLICATION testpub_default RENAME TO testpub_foo;
\dRp testpub_foo
RESET SESSION AUTHORIZATION;
DROP ROLE regress_publication_user;
+DROP ROLE regress_publication_user_dummy;
--
CREATE ROLE regress_subscription_user LOGIN SUPERUSER;
+CREATE ROLE regress_subscription_user_dummy LOGIN NOSUPERUSER;
SET SESSION AUTHORIZATION 'regress_subscription_user';
-- fail - no publications
COMMIT;
+-- fail - must be owner of subscription
+SET ROLE regress_subscription_user_dummy;
+ALTER SUBSCRIPTION testsub RENAME TO testsub_dummy;
+RESET ROLE;
+
ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
\dRs
RESET SESSION AUTHORIZATION;
DROP ROLE regress_subscription_user;
+DROP ROLE regress_subscription_user_dummy;