1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-29 22:49:41 +03:00

Fix parsing of DROP SUBSCRIPTION ... DROP SLOT

It didn't actually parse before.

Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
This commit is contained in:
Peter Eisentraut
2017-03-03 22:14:58 -05:00
parent 1309375e70
commit 347302730d
2 changed files with 7 additions and 5 deletions

View File

@@ -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,