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 /doc/src | |
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 'doc/src')
-rw-r--r-- | doc/src/sgml/catalogs.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/ref/alter_subscription.sgml | 35 |
2 files changed, 24 insertions, 13 deletions
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$<replaceable><iteration count></>:<replaceable><salt>< <para> This catalog only contains tables known to the subscription after running either <command>CREATE SUBSCRIPTION</command> or - <command>ALTER SUBSCRIPTION ... REFRESH</command>. + <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command>. </para> <table> 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 <refsynopsisdiv> <synopsis> ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> CONNECTION '<replaceable>conninfo</replaceable>' -ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> SET PUBLICATION <replaceable class="PARAMETER">publication_name</replaceable> [, ...] { REFRESH [ WITH ( <replaceable class="PARAMETER">refresh_option</replaceable> [= <replaceable class="PARAMETER">value</replaceable>] [, ... ] ) ] | SKIP REFRESH } +ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> SET PUBLICATION <replaceable class="PARAMETER">publication_name</replaceable> [, ...] [ WITH ( <replaceable class="PARAMETER">set_publication_option</replaceable> [= <replaceable class="PARAMETER">value</replaceable>] [, ... ] ) ] ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> REFRESH PUBLICATION [ WITH ( <replaceable class="PARAMETER">refresh_option</replaceable> [= <replaceable class="PARAMETER">value</replaceable>] [, ... ] ) ] ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> ENABLE ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> DISABLE @@ -80,18 +80,29 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> RENAME TO < <para> Changes list of subscribed publications. See <xref linkend="SQL-CREATESUBSCRIPTION"> for more information. + By default this command will also act like <literal>REFRESH + PUBLICATION</literal>. </para> <para> - When <literal>REFRESH</literal> is specified, this command will also act - like <literal>REFRESH - PUBLICATION</literal>. <literal>refresh_option</literal> specifies - additional options for the refresh operation, as described - under <literal>REFRESH PUBLICATION</literal>. When - <literal>SKIP REFRESH</literal> is specified, the command will not try - to refresh table information. Note that - either <literal>REFRESH</literal> or <literal>SKIP REFRESH</literal> - must be specified. + <replaceable>set_publication_option</replaceable> specifies additional + options for this operation. The supported options are: + + <variablelist> + <varlistentry> + <term><literal>refresh</literal> (<type>boolean</type>)</term> + <listitem> + <para> + When false, the command will not try to refresh table information. + <literal>REFRESH PUBLICATION</literal> should then be executed separately. + The default is <literal>true</literal>. + </para> + </listitem> + </varlistentry> + </variablelist> + + Additionally, refresh options as described + under <literal>REFRESH PUBLICATION</literal> may be specified. </para> </listitem> </varlistentry> @@ -107,7 +118,7 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> RENAME TO < </para> <para> - <literal>refresh_option</literal> specifies additional options for the + <replaceable>refresh_option</replaceable> specifies additional options for the refresh operation. The supported options are: <variablelist> @@ -185,7 +196,7 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> RENAME TO < Change the publication subscribed by a subscription to <literal>insert_only</literal>: <programlisting> -ALTER SUBSCRIPTION mysub SET PUBLICATION insert_only REFRESH; +ALTER SUBSCRIPTION mysub SET PUBLICATION insert_only; </programlisting> </para> |