diff options
author | Peter Eisentraut | 2017-06-06 01:37:00 +0000 |
---|---|---|
committer | Peter Eisentraut | 2017-06-06 01:43:25 +0000 |
commit | 9907b55ceb17f55bb508a1f24027a57530d84442 (patch) | |
tree | c15d0f470505ebd447496589fb1e354467bf7a16 /src/backend/parser | |
parent | 06bfb801c73c89e66f44c1cf693386793e98b637 (diff) |
Fix ALTER SUBSCRIPTION grammar ambiguity
There was a grammar ambiguity between SET PUBLICATION name REFRESH and
SET PUBLICATION SKIP REFRESH, because SKIP is not a reserved word. To
resolve that, fold the refresh choice into the WITH options. Refreshing
is the default now.
Reported-by: tushar <tushar.ahuja@enterprisedb.com>
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/gram.y | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 7e03624eb4..ada95e5bc3 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -9279,24 +9279,14 @@ AlterSubscriptionStmt: n->options = $6; $$ = (Node *)n; } - | ALTER SUBSCRIPTION name SET PUBLICATION publication_name_list REFRESH opt_definition - { - AlterSubscriptionStmt *n = - makeNode(AlterSubscriptionStmt); - n->kind = ALTER_SUBSCRIPTION_PUBLICATION_REFRESH; - n->subname = $3; - n->publication = $6; - n->options = $8; - $$ = (Node *)n; - } - | ALTER SUBSCRIPTION name SET PUBLICATION publication_name_list SKIP REFRESH + | ALTER SUBSCRIPTION name SET PUBLICATION publication_name_list opt_definition { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_PUBLICATION; n->subname = $3; n->publication = $6; - n->options = NIL; + n->options = $7; $$ = (Node *)n; } | ALTER SUBSCRIPTION name ENABLE_P |