Content-Length: 304573 | pFad | http://github.com/postgrespro/postgres_cluster/commit/347302730dc3092143ccbc1c29b47ac3354f924b

EB Fix parsing of DROP SUBSCRIPTION ... DROP SLOT · postgrespro/postgres_cluster@3473027 · GitHub
Skip to content

Commit 3473027

Browse files
committed
Fix parsing of DROP SUBSCRIPTION ... DROP SLOT
It didn't actually parse before. Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
1 parent 1309375 commit 3473027

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/backend/parser/gram.y

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9196,11 +9196,13 @@ DropSubscriptionStmt: DROP SUBSCRIPTION name opt_drop_slot
91969196
;
91979197

91989198
opt_drop_slot:
9199-
IDENT SLOT
9199+
DROP SLOT
92009200
{
9201-
if (strcmp($1, "drop") == 0)
9202-
$$ = TRUE;
9203-
else if (strcmp($1, "nodrop") == 0)
9201+
$$ = TRUE;
9202+
}
9203+
| IDENT SLOT
9204+
{
9205+
if (strcmp($1, "nodrop") == 0)
92049206
$$ = FALSE;
92059207
else
92069208
ereport(ERROR,

src/test/subscription/t/001_rep_changes.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
or die "Timed out while waiting for apply to restart";
180180

181181
# check all the cleanup
182-
$node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub_renamed");
182+
$node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub_renamed DROP SLOT");
183183

184184
$result =
185185
$node_subscriber->safe_psql('postgres', "SELECT count(*) FROM pg_subscription");

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/347302730dc3092143ccbc1c29b47ac3354f924b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy