Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cbf7ed5

Browse files
committed
doc: Improve CREATE PUBLICATION examples
1 parent b941891 commit cbf7ed5

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

doc/src/sgml/ref/create_publication.sgml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
163163
</para>
164164

165165
<para>
166-
<command>TRUNCATE</command> and other <acronym>DDL</acronym> operations
166+
<command>TRUNCATE</command> and <acronym>DDL</acronym> operations
167167
are not published.
168168
</para>
169169
</refsect1>
@@ -172,16 +172,25 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
172172
<title>Examples</title>
173173

174174
<para>
175-
Create a simple publication that just publishes all DML for tables in it:
175+
Create a publication that publishes all changes in two tables:
176176
<programlisting>
177-
CREATE PUBLICATION mypublication;
177+
CREATE PUBLICATION mypublication FOR TABLE users, departments;
178178
</programlisting>
179179
</para>
180180

181181
<para>
182-
Create an insert-only publication:
182+
Create a publication that publishes all changes in all tables:
183183
<programlisting>
184-
CREATE PUBLICATION insert_only WITH (NOPUBLISH UPDATE, NOPUBLISH DELETE);
184+
CREATE PUBLICATION alltables FOR ALL TABLES;
185+
</programlisting>
186+
</para>
187+
188+
<para>
189+
Create a publication that only publishes <command>INSERT</command>
190+
operations in one table:
191+
<programlisting>
192+
CREATE PUBLICATION insert_only FOR TABLE mydata
193+
WITH (NOPUBLISH UPDATE, NOPUBLISH DELETE);
185194
</programlisting>
186195
</para>
187196
</refsect1>

0 commit comments

Comments
 (0)