1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

Doc: Clarify that publication exclusions track table identity.

The EXCEPT clause of a FOR ALL TABLES publication tracks each excluded
table by its identity rather than by name. As a result, renaming a table
or moving it to another schema with ALTER TABLE ... SET SCHEMA leaves the
exclusion in place, and the table stays excluded from the publication.

This behavior was not previously documented and could surprise users who
might reasonably expect a schema-qualified exclusion to apply only while
the table remains in that schema. Add a note to CREATE PUBLICATION to make
the behavior explicit.

Author: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAHut+PvQ5BqnawCQd6r1tqqd+iAJC-CuRY8wscuXSrpHGUzofA@mail.gmail.com
This commit is contained in:
Amit Kapila
2026-06-18 08:02:33 +05:30
parent 34b198b2d7
commit 77b6dd9092

View File

@@ -200,6 +200,12 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
This clause specifies a list of tables to be excluded from the
publication.
</para>
<para>
Once a table is excluded, the exclusion applies to that table
regardless of its name or schema. Renaming the table or moving it to
another schema using <command>ALTER TABLE ... SET SCHEMA</command> does
not remove the exclusion.
</para>
<para>
For inherited tables, if <literal>ONLY</literal> is specified before the
table name, only that table is excluded from the publication. If