Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-19T17:50:37Z
Lists: pgsql-hackers
On Tue, Nov 18, 2025 at 5:27 PM Chao Li <li.evan.chao@gmail.com> wrote:
> Thanks for addressing the comments. V5 looks good to me.
Thanks both for the patch and review!
-<phrase>where <replaceable
class="parameter">all_publication_object</replaceable> is one
of:</phrase>
+ <phrase>where <replaceable
class="parameter">table_spec</replaceable> is:</phrase>
+
+ [ ONLY ] <replaceable
class="parameter">table_name</replaceable> [ * ] [ ( <replaceable
class="parameter">column_name</replaceable> [, ... ] ) ] [ WHERE (
<replaceable class="parameter">expression</replaceable> ) ]
+
+<phrase>where <replaceable
class="parameter">publication_all_object</replaceable> is one
of:</phrase>
In other documentation files (e.g., merge.sgml, analyze.sgml), the definitions
of each element are chained using "and". For example, in merge.sgml:
where data_source is:
...
and when_clause is:
...
and merge_insert is:
...
I think create_publication.sgml and alter_publication.sgml should follow
the same style for consistency. For example, in create_publication.sgml
we would have:
where publication_object
...
and publication_all_object
...
and table_spec
...
It seems better to put these sections in the same order that the elements
appear in the syntax. So I placed publication_all_object before table_spec
in the above example.
-<phrase>where <replaceable
class="parameter">all_publication_object</replaceable> is one
of:</phrase>
+ <phrase>where <replaceable
class="parameter">table_spec</replaceable> is:</phrase>
Regarding terminology: analyze.sgml uses table_and_columns for
a similar syntax, and personally I think table_and_columns is clearer than
table_spec.
Regards,
--
Fujii Masao
Commits
-
doc: Fix misleading synopsis for CREATE/ALTER PUBLICATION.
- f9f928304bb7 15.16 landed
- fc6e1a0f2bad 16.12 landed
- d7977668eec6 17.8 landed
- 9ad15f404a70 18.2 landed
- 246ec4a51c16 19 (unreleased) landed