Simplify publication/subscription tests a bit
After testing RENAME TO, rename the object back. This reduces the merge mess when subsequent patches add test cases before or after the rename test.
This commit is contained in:
parent
f2a9998fb3
commit
bd1827c7c9
@ -180,7 +180,9 @@ ALTER PUBLICATION testpub_default RENAME TO testpub_foo;
|
||||
testpub_foo | regress_publication_user | t | t | t
|
||||
(1 row)
|
||||
|
||||
DROP PUBLICATION testpub_foo;
|
||||
-- rename back to keep the rest simple
|
||||
ALTER PUBLICATION testpub_foo RENAME TO testpub_default;
|
||||
DROP PUBLICATION testpub_default;
|
||||
DROP PUBLICATION testpib_ins_trunct;
|
||||
DROP PUBLICATION testpub_fortbl;
|
||||
DROP SCHEMA pub_test CASCADE;
|
||||
|
@ -80,13 +80,15 @@ ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
|
||||
testsub_foo | regress_subscription_user | f | {testpub,testpub1}
|
||||
(1 row)
|
||||
|
||||
-- rename back to keep the rest simple
|
||||
ALTER SUBSCRIPTION testsub_foo RENAME TO testsub;
|
||||
-- fail - cannot do DROP SUBSCRIPTION DROP SLOT inside transaction block
|
||||
BEGIN;
|
||||
DROP SUBSCRIPTION testsub DROP SLOT;
|
||||
ERROR: DROP SUBSCRIPTION ... DROP SLOT cannot run inside a transaction block
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
DROP SUBSCRIPTION testsub_foo NODROP SLOT;
|
||||
DROP SUBSCRIPTION testsub NODROP SLOT;
|
||||
COMMIT;
|
||||
RESET SESSION AUTHORIZATION;
|
||||
DROP ROLE regress_subscription_user;
|
||||
|
@ -105,7 +105,10 @@ ALTER PUBLICATION testpub_default RENAME TO testpub_foo;
|
||||
|
||||
\dRp testpub_foo
|
||||
|
||||
DROP PUBLICATION testpub_foo;
|
||||
-- rename back to keep the rest simple
|
||||
ALTER PUBLICATION testpub_foo RENAME TO testpub_default;
|
||||
|
||||
DROP PUBLICATION testpub_default;
|
||||
DROP PUBLICATION testpib_ins_trunct;
|
||||
DROP PUBLICATION testpub_fortbl;
|
||||
|
||||
|
@ -53,13 +53,16 @@ ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
|
||||
|
||||
\dRs
|
||||
|
||||
-- rename back to keep the rest simple
|
||||
ALTER SUBSCRIPTION testsub_foo RENAME TO testsub;
|
||||
|
||||
-- fail - cannot do DROP SUBSCRIPTION DROP SLOT inside transaction block
|
||||
BEGIN;
|
||||
DROP SUBSCRIPTION testsub DROP SLOT;
|
||||
COMMIT;
|
||||
|
||||
BEGIN;
|
||||
DROP SUBSCRIPTION testsub_foo NODROP SLOT;
|
||||
DROP SUBSCRIPTION testsub NODROP SLOT;
|
||||
COMMIT;
|
||||
|
||||
RESET SESSION AUTHORIZATION;
|
||||
|
Loading…
x
Reference in New Issue
Block a user