From 08f6419050c089e716f2f900c8dc3215a3b121ca Mon Sep 17 00:00:00 2001 From: Petr Jelinek Date: Wed, 24 May 2017 21:27:56 +0200 Subject: [PATCH] Remove the SKIP REFRESH syntax suggar in ALTER SUBSCRIPTION --- doc/src/sgml/ref/alter_subscription.sgml | 9 +++------ src/backend/parser/gram.y | 2 +- src/test/regress/expected/subscription.out | 2 +- src/test/regress/sql/subscription.sql | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index 113e32b..5224052 100644 --- a/doc/src/sgml/ref/alter_subscription.sgml +++ b/doc/src/sgml/ref/alter_subscription.sgml @@ -22,7 +22,7 @@ PostgreSQL documentation ALTER SUBSCRIPTION name CONNECTION 'conninfo' -ALTER SUBSCRIPTION name SET PUBLICATION publication_name [, ...] { REFRESH [ WITH ( refresh_option [= value] [, ... ] ) ] | SKIP REFRESH } +ALTER SUBSCRIPTION name SET PUBLICATION publication_name [, ...] [ REFRESH [ WITH ( refresh_option [= value] [, ... ] ) ] ] ALTER SUBSCRIPTION name REFRESH PUBLICATION [ WITH ( refresh_option [= value] [, ... ] ) ] ALTER SUBSCRIPTION name ENABLE ALTER SUBSCRIPTION name DISABLE @@ -84,11 +84,8 @@ ALTER SUBSCRIPTION name RENAME TO < like REFRESH PUBLICATION. refresh_option specifies additional options for the refresh operation, as described - under REFRESH PUBLICATION. When - SKIP REFRESH is specified, the command will not try - to refresh table information. Note that - either REFRESH or SKIP REFRESH - must be specified. + under REFRESH PUBLICATION. Otherwise, the table + information will not be updated. diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 2822331..62f6b52 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -9289,7 +9289,7 @@ AlterSubscriptionStmt: n->options = $8; $$ = (Node *)n; } - | ALTER SUBSCRIPTION name SET PUBLICATION publication_name_list SKIP REFRESH + | ALTER SUBSCRIPTION name SET PUBLICATION publication_name_list { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); diff --git a/src/test/regress/expected/subscription.out b/src/test/regress/expected/subscription.out index 91ba8ab..0e8d809 100644 --- a/src/test/regress/expected/subscription.out +++ b/src/test/regress/expected/subscription.out @@ -82,7 +82,7 @@ ERROR: invalid connection string syntax: missing "=" after "foobar" in connecti testsub | regress_subscription_user | f | {testpub} | off | dbname=doesnotexist (1 row) -ALTER SUBSCRIPTION testsub SET PUBLICATION testpub2, testpub3 SKIP REFRESH; +ALTER SUBSCRIPTION testsub SET PUBLICATION testpub2, testpub3; ALTER SUBSCRIPTION testsub CONNECTION 'dbname=doesnotexist2'; ALTER SUBSCRIPTION testsub SET (slot_name = 'newname'); -- fail diff --git a/src/test/regress/sql/subscription.sql b/src/test/regress/sql/subscription.sql index 4b694a3..04aa063 100644 --- a/src/test/regress/sql/subscription.sql +++ b/src/test/regress/sql/subscription.sql @@ -61,7 +61,7 @@ ALTER SUBSCRIPTION testsub CONNECTION 'foobar'; \dRs+ -ALTER SUBSCRIPTION testsub SET PUBLICATION testpub2, testpub3 SKIP REFRESH; +ALTER SUBSCRIPTION testsub SET PUBLICATION testpub2, testpub3; ALTER SUBSCRIPTION testsub CONNECTION 'dbname=doesnotexist2'; ALTER SUBSCRIPTION testsub SET (slot_name = 'newname'); -- 2.7.4