mirror of
https://github.com/postgres/postgres.git
synced 2025-10-28 11:55:03 +03:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user