File tree 4 files changed +14
-4
lines changed
4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,9 @@ ALTER PUBLICATION testpub_default RENAME TO testpub_foo;
180
180
testpub_foo | regress_publication_user | t | t | t
181
181
(1 row)
182
182
183
- DROP PUBLICATION testpub_foo;
183
+ -- rename back to keep the rest simple
184
+ ALTER PUBLICATION testpub_foo RENAME TO testpub_default;
185
+ DROP PUBLICATION testpub_default;
184
186
DROP PUBLICATION testpib_ins_trunct;
185
187
DROP PUBLICATION testpub_fortbl;
186
188
DROP SCHEMA pub_test CASCADE;
Original file line number Diff line number Diff line change @@ -80,13 +80,15 @@ ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
80
80
testsub_foo | regress_subscription_user | f | {testpub,testpub1}
81
81
(1 row)
82
82
83
+ -- rename back to keep the rest simple
84
+ ALTER SUBSCRIPTION testsub_foo RENAME TO testsub;
83
85
-- fail - cannot do DROP SUBSCRIPTION DROP SLOT inside transaction block
84
86
BEGIN;
85
87
DROP SUBSCRIPTION testsub DROP SLOT;
86
88
ERROR: DROP SUBSCRIPTION ... DROP SLOT cannot run inside a transaction block
87
89
COMMIT;
88
90
BEGIN;
89
- DROP SUBSCRIPTION testsub_foo NODROP SLOT;
91
+ DROP SUBSCRIPTION testsub NODROP SLOT;
90
92
COMMIT;
91
93
RESET SESSION AUTHORIZATION;
92
94
DROP ROLE regress_subscription_user;
Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ ALTER PUBLICATION testpub_default RENAME TO testpub_foo;
105
105
106
106
\dRp testpub_foo
107
107
108
- DROP PUBLICATION testpub_foo;
108
+ -- rename back to keep the rest simple
109
+ ALTER PUBLICATION testpub_foo RENAME TO testpub_default;
110
+
111
+ DROP PUBLICATION testpub_default;
109
112
DROP PUBLICATION testpib_ins_trunct;
110
113
DROP PUBLICATION testpub_fortbl;
111
114
Original file line number Diff line number Diff line change @@ -53,13 +53,16 @@ ALTER SUBSCRIPTION testsub RENAME TO testsub_foo;
53
53
54
54
\dRs
55
55
56
+ -- rename back to keep the rest simple
57
+ ALTER SUBSCRIPTION testsub_foo RENAME TO testsub;
58
+
56
59
-- fail - cannot do DROP SUBSCRIPTION DROP SLOT inside transaction block
57
60
BEGIN ;
58
61
DROP SUBSCRIPTION testsub DROP SLOT;
59
62
COMMIT ;
60
63
61
64
BEGIN ;
62
- DROP SUBSCRIPTION testsub_foo NODROP SLOT;
65
+ DROP SUBSCRIPTION testsub NODROP SLOT;
63
66
COMMIT ;
64
67
65
68
RESET SESSION AUTHORIZATION;
You can’t perform that action at this time.
0 commit comments