<literal>publish_via_partition_root</literal> is true,
or from the partition itself if it is false (the default).
See <xref linkend="logical-replication-row-filter"/> for details about row
filters.
Similarly, for published partitioned tables, the column list for each
partition is taken from the published partitioned table if the
publication parameter <literal>publish_via_partition_root</literal> is true,
or from the partition itself if it is false.
</para>
<para>
For an <command>INSERT ... ON CONFLICT</command> command, the publication will
publish the operation that results from the command. Depending
on the outcome, it may be published as either <command>INSERT</command> or
<command>UPDATE</command>, or it may not be published at all.
</para>
<para>
For a <command>MERGE</command> command, the publication will publish an
<command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command>
for each row inserted, updated, or deleted.
</para>
<para>
<command>ATTACH</command>ing a table into a partition tree whose root is
published using a publication with <literal>publish_via_partition_root</literal>
set to <literal>true</literal> does not result in the table's existing contents
being replicated.
</para>
<para>
<command>COPY ... FROM</command> commands are published
as <command>INSERT</command> operations.
</para>
<para>
<acronym>DDL</acronym> operations are not published.
</para>
<para>
The <literal>WHERE</literal> clause expression is executed with the role used
for the replication connection.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Create a publication that publishes all changes in two tables:
<programlisting>
CREATE PUBLICATION mypublication FOR TABLE users, departments;
</programlisting>
</para>
<para>
Create a publication that publishes all changes from active departments:
<programlisting>
CREATE PUBLICATION active_departments