mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION
At present, if we want to update publications in a subscription, we can use SET PUBLICATION. However, it requires supplying all publications that exists and the new publications. If we want to add new publications, it's inconvenient. The new syntax only supplies the new publications. When the refresh is true, it only refreshes the new publications. Author: Japin Li <japinli@hotmail.com> Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/MEYP282MB166939D0D6C480B7FBE7EFFBB6BC0@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
This commit is contained in:
@@ -9687,11 +9687,31 @@ AlterSubscriptionStmt:
|
||||
n->options = $6;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
| ALTER SUBSCRIPTION name ADD_P PUBLICATION name_list opt_definition
|
||||
{
|
||||
AlterSubscriptionStmt *n =
|
||||
makeNode(AlterSubscriptionStmt);
|
||||
n->kind = ALTER_SUBSCRIPTION_ADD_PUBLICATION;
|
||||
n->subname = $3;
|
||||
n->publication = $6;
|
||||
n->options = $7;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
| ALTER SUBSCRIPTION name DROP PUBLICATION name_list opt_definition
|
||||
{
|
||||
AlterSubscriptionStmt *n =
|
||||
makeNode(AlterSubscriptionStmt);
|
||||
n->kind = ALTER_SUBSCRIPTION_DROP_PUBLICATION;
|
||||
n->subname = $3;
|
||||
n->publication = $6;
|
||||
n->options = $7;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
| ALTER SUBSCRIPTION name SET PUBLICATION name_list opt_definition
|
||||
{
|
||||
AlterSubscriptionStmt *n =
|
||||
makeNode(AlterSubscriptionStmt);
|
||||
n->kind = ALTER_SUBSCRIPTION_PUBLICATION;
|
||||
n->kind = ALTER_SUBSCRIPTION_SET_PUBLICATION;
|
||||
n->subname = $3;
|
||||
n->publication = $6;
|
||||
n->options = $7;
|
||||
|
Reference in New Issue
Block a user