Skip to content

Commit f9f9283

Browse files
committed
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@gmail.com> Reviewed-by: Chao Li <lic@highgo.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CAHut+PtsyvYL3KmA6C8f0ZpXQ=7FEqQtETVy-BOF+cm9WPvfMQ@mail.gmail.com Backpatch-through: 15
1 parent eb7743e commit f9f9283

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

doc/src/sgml/ref/alter_publication.sgml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
3030

3131
<phrase>where <replaceable class="parameter">publication_object</replaceable> is one of:</phrase>
3232

33-
TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) ] [ WHERE ( <replaceable class="parameter">expression</replaceable> ) ] [, ... ]
33+
TABLE <replaceable class="parameter">table_and_columns</replaceable> [, ... ]
3434
TABLES IN SCHEMA { <replaceable class="parameter">schema_name</replaceable> | CURRENT_SCHEMA } [, ... ]
3535

36-
<phrase>where <replaceable class="parameter">publication_drop_object</replaceable> is one of:</phrase>
36+
<phrase>and <replaceable class="parameter">publication_drop_object</replaceable> is one of:</phrase>
3737

3838
TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [, ... ]
3939
TABLES IN SCHEMA { <replaceable class="parameter">schema_name</replaceable> | CURRENT_SCHEMA } [, ... ]
40+
41+
<phrase>and <replaceable class="parameter">table_and_columns</replaceable> is:</phrase>
42+
43+
[ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) ] [ WHERE ( <replaceable class="parameter">expression</replaceable> ) ]
4044
</synopsis>
4145
</refsynopsisdiv>
4246

doc/src/sgml/ref/create_publication.sgml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
2828

2929
<phrase>where <replaceable class="parameter">publication_object</replaceable> is one of:</phrase>
3030

31-
TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) ] [ WHERE ( <replaceable class="parameter">expression</replaceable> ) ] [, ... ]
31+
TABLE <replaceable class="parameter">table_and_columns</replaceable> [, ... ]
3232
TABLES IN SCHEMA { <replaceable class="parameter">schema_name</replaceable> | CURRENT_SCHEMA } [, ... ]
33+
34+
<phrase>and <replaceable class="parameter">table_and_columns</replaceable> is:</phrase>
35+
36+
[ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ ( <replaceable class="parameter">column_name</replaceable> [, ... ] ) ] [ WHERE ( <replaceable class="parameter">expression</replaceable> ) ]
3337
</synopsis>
3438
</refsynopsisdiv>
3539

0 commit comments

Comments
 (0)