pgsql: doc: Fix misleading synopsis for CREATE/ALTER PUBLICATION.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: doc: Fix misleading synopsis for CREATE/ALTER PUBLICATION.
Date: 2025-11-27 14:33:22
Message-ID: E1vOd3i-001fc4-1O@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

doc: Fix misleading synopsis for CREATE/ALTER PUBLICATION.

The documentation for CREATE/ALTER PUBLICATION previously showed:

[ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [ WHERE ( expression ) ] [, ... ]

to indicate that the table/column specification could be repeated.
However, placing [, ... ] directly after a multi-part construct was
misleading and made it unclear which portion was repeatable.

This commit introduces a new term, table_and_columns, to represent:

[ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [ WHERE ( expression ) ]

and updates the synopsis to use:

table_and_columns [, ... ]

which clearly identifies the repeatable element.

Backpatched to v15, where the misleading syntax was introduced.

Author: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: Chao Li <lic(at)highgo(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHut+PtsyvYL3KmA6C8f0ZpXQ=7FEqQtETVy-BOF+cm9WPvfMQ@mail.gmail.com
Backpatch-through: 15

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f9f928304bb720d5e94651acd6b3e71a6f267430

Modified Files
--------------
doc/src/sgml/ref/alter_publication.sgml | 8 ++++++--
doc/src/sgml/ref/create_publication.sgml | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-11-27 18:10:22 pgsql: Allow indexscans on partial hash indexes with implied quals.
Previous Message Fujii Masao 2025-11-27 14:33:12 pgsql: doc: Fix misleading synopsis for CREATE/ALTER PUBLICATION.