mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +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:
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user