On Thu, Jul 16, 2026 at 8:32 PM shveta malik <[email protected]> wrote:
...
> 4)
> postgres=# create publication pub1 for tables in schema s2 except
> (table s2.tab_root), table s2.tab_part_2, table s2.tab_part_1_p2;
> ERROR:  partition "s2.tab_part_2" cannot be both published and excluded
> DETAIL:  Ancestor "s2.tab_root" of partition "s2.tab_part_2" is
> currently listed in the EXCEPT clause of this command.
>
> postgres=# ALTER publication pub1 add TABLE s2.tab_part_1_p2;
> ERROR:  cannot add partition "s2.tab_part_1_p2" to publication "pub1"
> DETAIL:  Ancestor "s2.tab_root" of partition "s2.tab_part_1_p2" is
> currently listed in the EXCEPT clause of the publication.
> HINT:  Change EXCEPT list using ALTER PUBLICATION ... SET TABLES IN
> SCHEMA ... EXCEPT.
>
>
> Should the DETAIL be just:
> DETAIL:  Partition root "s2.tab_root" is listed in the publication's
> EXCEPT clause.
>
> Thoughts?

After some offline discussion, we've landed on the following consensus
for this errdetail replacement:

DETAIL: Partition root "s2.tab_root" is named in the publication's
EXCEPT clause for schema "s2"

- The earlier message wrongly implied that a publication can have only
1 EXCEPT clause
- This new one explicitly identifies exactly which EXCEPT clause is involved
- IIUC, this particular message is never used by the ALL TABLES EXCEPT
logic, so naming the schema should be fine

======
Kind Regards,
Peter Smith.
Fujitsu Australia


Reply via email to