Commit 185364b1 authored by Peter Eisentraut's avatar Peter Eisentraut

doc: Fix ALTER PUBLICATION details

Some of the text was made nonsensical by commit
e9500240.  Fix that and make some other
minor changes.
Reported-by: default avatarJeff Janes <jeff.janes@gmail.com>
parent 80f583ff
...@@ -34,28 +34,40 @@ ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> RENAME TO <r ...@@ -34,28 +34,40 @@ ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> RENAME TO <r
<title>Description</title> <title>Description</title>
<para> <para>
The first variant of this command listed in the synopsis can change The command <command>ALTER PUBLICATION</command> can change the attributes
of a publication.
</para>
<para>
The first three variants change which tables are part of the publication.
The <literal>SET TABLE</literal> clause will replace the list of tables in
the publication with the specified one. The <literal>ADD TABLE</literal>
and <literal>DROP TABLE</literal> clauses will add and remove one or more
tables from the publication. Note that adding tables to a publication that
is already subscribed to will require a <literal>ALTER SUBSCRIPTION
... REFRESH PUBLICATION</literal> action on the subscribing side in order
to become effective.
</para>
<para>
The fourth variant of this command listed in the synopsis can change
all of the publication properties specified in all of the publication properties specified in
<xref linkend="sql-createpublication">. Properties not mentioned in the <xref linkend="sql-createpublication">. Properties not mentioned in the
command retain their previous settings. command retain their previous settings.
</para> </para>
<para> <para>
The remaining variants change the owner and the name of the publication.
</para>
<para>
You must own the publication to use <command>ALTER PUBLICATION</command>.
To alter the owner, you must also be a direct or indirect member of the new To alter the owner, you must also be a direct or indirect member of the new
owning role. The new owner must have <literal>CREATE</literal> privilege on owning role. The new owner must have <literal>CREATE</literal> privilege on
the database. Also, the new owner of a <literal>FOR ALL TABLES</literal> the database. Also, the new owner of a <literal>FOR ALL TABLES</literal>
publication must be a superuser. However, a superuser can change the publication must be a superuser. However, a superuser can change the
ownership of a publication while circumventing these restrictions. ownership of a publication while circumventing these restrictions.
</para> </para>
<para>
The other variants of this command deal with the table membership of the
publication. The <literal>SET TABLE</literal> clause will replace the
list of tables in the publication with the specified one.
The <literal>ADD TABLE</literal> and
<literal>DROP TABLE</literal> will add and remove one or more tables from
the publication.
</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
...@@ -147,6 +159,8 @@ ALTER PUBLICATION mypublication ADD TABLE users, departments; ...@@ -147,6 +159,8 @@ ALTER PUBLICATION mypublication ADD TABLE users, departments;
<simplelist type="inline"> <simplelist type="inline">
<member><xref linkend="sql-createpublication"></member> <member><xref linkend="sql-createpublication"></member>
<member><xref linkend="sql-droppublication"></member> <member><xref linkend="sql-droppublication"></member>
<member><xref linkend="sql-createsubscription"></member>
<member><xref linkend="sql-altersubscription"></member>
</simplelist> </simplelist>
</refsect1> </refsect1>
</refentry> </refentry>
...@@ -42,8 +42,11 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> RENAME TO < ...@@ -42,8 +42,11 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> RENAME TO <
</para> </para>
<para> <para>
You must own the subscription to use <command>ALTER SUBSCRIPTION</>.
To alter the owner, you must also be a direct or indirect member of the To alter the owner, you must also be a direct or indirect member of the
new owning role. The new owner has to be a superuser. new owning role. The new owner has to be a superuser.
(Currently, all subscription owners must be superusers, so the owner checks
will be bypassed in practice. But this might change in the future.)
</para> </para>
</refsect1> </refsect1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment