Commit 34730273 authored by Peter Eisentraut's avatar Peter Eisentraut

Fix parsing of DROP SUBSCRIPTION ... DROP SLOT

It didn't actually parse before.
Reported-by: default avatarMasahiko Sawada <sawada.mshk@gmail.com>
parent 1309375e
......@@ -9196,11 +9196,13 @@ DropSubscriptionStmt: DROP SUBSCRIPTION name opt_drop_slot
;
opt_drop_slot:
IDENT SLOT
DROP SLOT
{
if (strcmp($1, "drop") == 0)
$$ = TRUE;
else if (strcmp($1, "nodrop") == 0)
$$ = TRUE;
}
| IDENT SLOT
{
if (strcmp($1, "nodrop") == 0)
$$ = FALSE;
else
ereport(ERROR,
......
......@@ -179,7 +179,7 @@ $node_publisher->poll_query_until('postgres',
or die "Timed out while waiting for apply to restart";
# check all the cleanup
$node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub_renamed");
$node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub_renamed DROP SLOT");
$result =
$node_subscriber->safe_psql('postgres', "SELECT count(*) FROM pg_subscription");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment