From 9907b55ceb17f55bb508a1f24027a57530d84442 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 5 Jun 2017 21:37:00 -0400 Subject: 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 --- doc/src/sgml/catalogs.sgml | 2 +- doc/src/sgml/ref/alter_subscription.sgml | 35 +++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 13 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index b2fae027f5..5723be744d 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -6609,7 +6609,7 @@ SCRAM-SHA-256$<iteration count>:<salt>< This catalog only contains tables known to the subscription after running either CREATE SUBSCRIPTION or - ALTER SUBSCRIPTION ... REFRESH. + ALTER SUBSCRIPTION ... REFRESH PUBLICATION. diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index a3471a0442..bead99622e 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 [, ...] [ WITH ( set_publication_option [= value] [, ... ] ) ] ALTER SUBSCRIPTION name REFRESH PUBLICATION [ WITH ( refresh_option [= value] [, ... ] ) ] ALTER SUBSCRIPTION name ENABLE ALTER SUBSCRIPTION name DISABLE @@ -80,18 +80,29 @@ ALTER SUBSCRIPTION name RENAME TO < Changes list of subscribed publications. See for more information. + By default this command will also act like REFRESH + PUBLICATION. - When REFRESH is specified, this command will also act - 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. + set_publication_option specifies additional + options for this operation. The supported options are: + + + + refresh (boolean) + + + When false, the command will not try to refresh table information. + REFRESH PUBLICATION should then be executed separately. + The default is true. + + + + + + Additionally, refresh options as described + under REFRESH PUBLICATION may be specified. @@ -107,7 +118,7 @@ ALTER SUBSCRIPTION name RENAME TO < - refresh_option specifies additional options for the + refresh_option specifies additional options for the refresh operation. The supported options are: @@ -185,7 +196,7 @@ ALTER SUBSCRIPTION name RENAME TO < Change the publication subscribed by a subscription to insert_only: -ALTER SUBSCRIPTION mysub SET PUBLICATION insert_only REFRESH; +ALTER SUBSCRIPTION mysub SET PUBLICATION insert_only; -- cgit v1.2.3