Skip to content

Commit 185364b

Browse files
committed
doc: Fix ALTER PUBLICATION details
Some of the text was made nonsensical by commit e950024. Fix that and make some other minor changes. Reported-by: Jeff Janes <jeff.janes@gmail.com>
1 parent 80f583f commit 185364b

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

doc/src/sgml/ref/alter_publication.sgml

+24-10
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,40 @@ ALTER PUBLICATION <replaceable class="PARAMETER">name</replaceable> RENAME TO <r
3434
<title>Description</title>
3535

3636
<para>
37-
The first variant of this command listed in the synopsis can change
37+
The command <command>ALTER PUBLICATION</command> can change the attributes
38+
of a publication.
39+
</para>
40+
41+
<para>
42+
The first three variants change which tables are part of the publication.
43+
The <literal>SET TABLE</literal> clause will replace the list of tables in
44+
the publication with the specified one. The <literal>ADD TABLE</literal>
45+
and <literal>DROP TABLE</literal> clauses will add and remove one or more
46+
tables from the publication. Note that adding tables to a publication that
47+
is already subscribed to will require a <literal>ALTER SUBSCRIPTION
48+
... REFRESH PUBLICATION</literal> action on the subscribing side in order
49+
to become effective.
50+
</para>
51+
52+
<para>
53+
The fourth variant of this command listed in the synopsis can change
3854
all of the publication properties specified in
3955
<xref linkend="sql-createpublication">. Properties not mentioned in the
4056
command retain their previous settings.
4157
</para>
4258

4359
<para>
60+
The remaining variants change the owner and the name of the publication.
61+
</para>
62+
63+
<para>
64+
You must own the publication to use <command>ALTER PUBLICATION</command>.
4465
To alter the owner, you must also be a direct or indirect member of the new
4566
owning role. The new owner must have <literal>CREATE</literal> privilege on
4667
the database. Also, the new owner of a <literal>FOR ALL TABLES</literal>
4768
publication must be a superuser. However, a superuser can change the
4869
ownership of a publication while circumventing these restrictions.
4970
</para>
50-
51-
<para>
52-
The other variants of this command deal with the table membership of the
53-
publication. The <literal>SET TABLE</literal> clause will replace the
54-
list of tables in the publication with the specified one.
55-
The <literal>ADD TABLE</literal> and
56-
<literal>DROP TABLE</literal> will add and remove one or more tables from
57-
the publication.
58-
</para>
5971
</refsect1>
6072

6173
<refsect1>
@@ -147,6 +159,8 @@ ALTER PUBLICATION mypublication ADD TABLE users, departments;
147159
<simplelist type="inline">
148160
<member><xref linkend="sql-createpublication"></member>
149161
<member><xref linkend="sql-droppublication"></member>
162+
<member><xref linkend="sql-createsubscription"></member>
163+
<member><xref linkend="sql-altersubscription"></member>
150164
</simplelist>
151165
</refsect1>
152166
</refentry>

doc/src/sgml/ref/alter_subscription.sgml

+3
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> RENAME TO <
4242
</para>
4343

4444
<para>
45+
You must own the subscription to use <command>ALTER SUBSCRIPTION</>.
4546
To alter the owner, you must also be a direct or indirect member of the
4647
new owning role. The new owner has to be a superuser.
48+
(Currently, all subscription owners must be superusers, so the owner checks
49+
will be bypassed in practice. But this might change in the future.)
4750
</para>
4851
</refsect1>
4952

0 commit comments

Comments
 (0)