diff options
| author | Peter Eisentraut | 2017-03-04 03:14:58 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2017-03-04 04:29:13 +0000 |
| commit | 347302730dc3092143ccbc1c29b47ac3354f924b (patch) | |
| tree | 74cc263bd0bc0c3e23ba6c304b4dba77f004edb4 /src/backend/parser | |
| parent | 1309375e706440e1e2fe2a5bb74effbc639261ef (diff) | |
Fix parsing of DROP SUBSCRIPTION ... DROP SLOT
It didn't actually parse before.
Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
Diffstat (limited to 'src/backend/parser')
| -rw-r--r-- | src/backend/parser/gram.y | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 9713b44223..29fde33b2b 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -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, |
