public inbox for [email protected]help / color / mirror / Atom feed
DOCS - CREATE PUBLICATION ... EXCEPT missing details on ONLY 5+ messages / 2 participants [nested] [flat]
* DOCS - CREATE PUBLICATION ... EXCEPT missing details on ONLY @ 2026-04-16 23:55 Peter Smith <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Peter Smith @ 2026-04-16 23:55 UTC (permalink / raw) To: PostgreSQL Hackers <[email protected]> Hi, Currently, the EXCEPT (TABLE ...) part mentions how 'ONLY' and '*' work for inheritance tables, but how they have no effect for partitioned tables [1]. It seems we accidentally missed saying that these also have no effect for *regular* tables. PSA: a patch to clarify this. ====== [1] https://www.postgresql.org/docs/devel/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-FOR-EX... Kind Regards, Peter Smith. Fujitsu Australia Attachments: [application/octet-stream] v1-0001-Fix-note-about-ONLY-to-mention-regular-tables-too.patch (1.3K, 2-v1-0001-Fix-note-about-ONLY-to-mention-regular-tables-too.patch) download | inline diff: From f83baefec49db09cefcbea0c10e6655460e6b55d Mon Sep 17 00:00:00 2001 From: Peter Smith <[email protected]> Date: Fri, 17 Apr 2026 09:47:57 +1000 Subject: [PATCH v1] Fix note about ONLY to mention regular tables too --- doc/src/sgml/ref/create_publication.sgml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml index 0ac576d3f10..a92457f8bf0 100644 --- a/doc/src/sgml/ref/create_publication.sgml +++ b/doc/src/sgml/ref/create_publication.sgml @@ -211,9 +211,11 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable> <para> For partitioned tables, only the root partitioned table may be specified in <literal>EXCEPT</literal>. Doing so excludes the root table and - all of its partitions from replication. The optional - <literal>ONLY</literal> and <literal>*</literal> has no effect for - partitioned tables. + all of its partitions from replication. + </para> + <para> + The optional <literal>ONLY</literal> and <literal>*</literal> have no + effect for regular or partitioned tables. </para> <para> There can be a case where a subscription includes multiple publications. -- 2.47.3 ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: DOCS - CREATE PUBLICATION ... EXCEPT missing details on ONLY @ 2026-04-17 10:44 Amit Kapila <[email protected]> parent: Peter Smith <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Amit Kapila @ 2026-04-17 10:44 UTC (permalink / raw) To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> On Fri, Apr 17, 2026 at 5:26 AM Peter Smith <[email protected]> wrote: > > Currently, the EXCEPT (TABLE ...) part mentions how 'ONLY' and '*' > work for inheritance tables, but how they have no effect for > partitioned tables [1]. > > It seems we accidentally missed saying that these also have no effect > for *regular* tables. > The sentence you quoted speaks about partitioned tables specifically, so not mentioning regular tables there seems reasonable to me. -- With Regards, Amit Kapila. ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: DOCS - CREATE PUBLICATION ... EXCEPT missing details on ONLY @ 2026-04-20 00:14 Peter Smith <[email protected]> parent: Amit Kapila <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Peter Smith @ 2026-04-20 00:14 UTC (permalink / raw) To: Amit Kapila <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> On Fri, Apr 17, 2026 at 8:44 PM Amit Kapila <[email protected]> wrote: > > On Fri, Apr 17, 2026 at 5:26 AM Peter Smith <[email protected]> wrote: > > > > Currently, the EXCEPT (TABLE ...) part mentions how 'ONLY' and '*' > > work for inheritance tables, but how they have no effect for > > partitioned tables [1]. > > > > It seems we accidentally missed saying that these also have no effect > > for *regular* tables. > > > > The sentence you quoted speaks about partitioned tables specifically, > so not mentioning regular tables there seems reasonable to me. > I think you missed my point. The EXCEPT clause syntax allows any of the following: ... EXCEPT (TABLE ONLY parent_table); ... EXCEPT (TABLE parent_table *); ... EXCEPT (TABLE ONLY partitioned_root_table); ... EXCEPT (TABLE partitioned_root_table *); ... EXCEPT (TABLE ONLY regular_table); ... EXCEPT (TABLE regular_table *); ~~ Where: 1. Using ONLY/* for parent_table has a meaning. 2. Using ONLY/* for partitioned_root_table has no meaning but it is allowed/ignored. 3. Using ONLY/* for regular_table has no meaning but it is allowed/ignored. The EXCEPT clause documentation already described cases 1 and 2, but it said nothing about case 3. I could have left the original 'partitioned tables' paragraph alone, and then written separately about the regular tables. e.g: ------ For partitioned tables, only the root partitioned table may be specified in EXCEPT. Doing so excludes the root table and all of its partitions from replication. The optional ONLY and * has no effect for partitioned tables. The optional ONLY and * have no effect for regular tables. ------ But it seemed unnecessarily repetitive, so the patch seperates that common behaviour to say: ------ For partitioned tables, only the root partitioned table may be specified in EXCEPT. Doing so excludes the root table and all of its partitions from replication. The optional ONLY and * have no effect for regular or partitioned tables. ------ ====== Kind Regards, Peter Smith. Fujitsu Australia. ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: DOCS - CREATE PUBLICATION ... EXCEPT missing details on ONLY @ 2026-04-20 05:45 Amit Kapila <[email protected]> parent: Peter Smith <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Amit Kapila @ 2026-04-20 05:45 UTC (permalink / raw) To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> On Mon, Apr 20, 2026 at 5:44 AM Peter Smith <[email protected]> wrote: > > On Fri, Apr 17, 2026 at 8:44 PM Amit Kapila <[email protected]> wrote: > > > > On Fri, Apr 17, 2026 at 5:26 AM Peter Smith <[email protected]> wrote: > > > > > > Currently, the EXCEPT (TABLE ...) part mentions how 'ONLY' and '*' > > > work for inheritance tables, but how they have no effect for > > > partitioned tables [1]. > > > > > > It seems we accidentally missed saying that these also have no effect > > > for *regular* tables. > > > > > > > The sentence you quoted speaks about partitioned tables specifically, > > so not mentioning regular tables there seems reasonable to me. > > > > I think you missed my point. > No, I understood the point but didn't find it useful to add this to regular tables because they won't have children in any form. -- With Regards, Amit Kapila. ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: DOCS - CREATE PUBLICATION ... EXCEPT missing details on ONLY @ 2026-04-20 07:14 Peter Smith <[email protected]> parent: Amit Kapila <[email protected]> 0 siblings, 0 replies; 5+ messages in thread From: Peter Smith @ 2026-04-20 07:14 UTC (permalink / raw) To: Amit Kapila <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> On Mon, Apr 20, 2026 at 3:45 PM Amit Kapila <[email protected]> wrote: > > On Mon, Apr 20, 2026 at 5:44 AM Peter Smith <[email protected]> wrote: > > > > On Fri, Apr 17, 2026 at 8:44 PM Amit Kapila <[email protected]> wrote: > > > > > > On Fri, Apr 17, 2026 at 5:26 AM Peter Smith <[email protected]> wrote: > > > > > > > > Currently, the EXCEPT (TABLE ...) part mentions how 'ONLY' and '*' > > > > work for inheritance tables, but how they have no effect for > > > > partitioned tables [1]. > > > > > > > > It seems we accidentally missed saying that these also have no effect > > > > for *regular* tables. > > > > > > > > > > The sentence you quoted speaks about partitioned tables specifically, > > > so not mentioning regular tables there seems reasonable to me. > > > > > > > I think you missed my point. > > > > No, I understood the point but didn't find it useful to add this to > regular tables because they won't have children in any form. > Because regular tables won't have children in any form, a user could reasonably worry that saying ONLY or `*` might give a runtime error or a warning. There is no documentation to say otherwise. The patch addresses that gap. ====== Kind Regards, Peter Smith. Fujitsu Australia ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-04-20 07:14 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-04-16 23:55 DOCS - CREATE PUBLICATION ... EXCEPT missing details on ONLY Peter Smith <[email protected]> 2026-04-17 10:44 ` Amit Kapila <[email protected]> 2026-04-20 00:14 ` Peter Smith <[email protected]> 2026-04-20 05:45 ` Amit Kapila <[email protected]> 2026-04-20 07:14 ` Peter Smith <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox