From: Fujii Masao Date: Thu, 27 Nov 2025 14:30:51 +0000 (+0900) Subject: doc: Fix misleading synopsis for CREATE/ALTER PUBLICATION. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f9f928304bb720d5e94651acd6b3e71a6f267430;p=postgresql.git 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 Reviewed-by: Chao Li Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/CAHut+PtsyvYL3KmA6C8f0ZpXQ=7FEqQtETVy-BOF+cm9WPvfMQ@mail.gmail.com Backpatch-through: 15 --- diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index 9e7f60a290a..858daec65a0 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -30,13 +30,17 @@ ALTER PUBLICATION name RENAME TO where publication_object is one of: - TABLE [ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [ WHERE ( expression ) ] [, ... ] + TABLE table_and_columns [, ... ] TABLES IN SCHEMA { schema_name | CURRENT_SCHEMA } [, ... ] -where publication_drop_object is one of: +and publication_drop_object is one of: TABLE [ ONLY ] table_name [ * ] [, ... ] TABLES IN SCHEMA { schema_name | CURRENT_SCHEMA } [, ... ] + +and table_and_columns is: + + [ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [ WHERE ( expression ) ] diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml index 7ab7e77f337..787750b8664 100644 --- a/doc/src/sgml/ref/create_publication.sgml +++ b/doc/src/sgml/ref/create_publication.sgml @@ -28,8 +28,12 @@ CREATE PUBLICATION name where publication_object is one of: - TABLE [ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [ WHERE ( expression ) ] [, ... ] + TABLE table_and_columns [, ... ] TABLES IN SCHEMA { schema_name | CURRENT_SCHEMA } [, ... ] + +and table_and_columns is: + + [ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [ WHERE ( expression ) ]