From df53fa1c1ebf9bb3e8c17217f7cc1435107067fb Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Wed, 12 Nov 2025 13:37:58 +0900 Subject: [PATCH] doc: Fix incorrect synopsis for ALTER PUBLICATION ... DROP ... The synopsis for the ALTER PUBLICATION ... DROP ... command incorrectly implied that a column list and WHERE clause could be specified as part of the publication object. However, these options are not allowed for DROP operations, making the documentation misleading. This commit corrects the synopsis to clearly show only the valid forms of publication objects. Backpatched to v15, where the incorrect synopsis was introduced. Author: Peter Smith Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/CAHut+PsPu+47Q7b0o6h1r-qSt90U3zgbAHMHUag5o5E1Lo+=uw@mail.gmail.com Backpatch-through: 15 --- doc/src/sgml/ref/alter_publication.sgml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index c36e754f887..8dd250d2f3b 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -23,7 +23,7 @@ PostgreSQL documentation ALTER PUBLICATION name ADD publication_object [, ...] ALTER PUBLICATION name SET publication_object [, ...] -ALTER PUBLICATION name DROP publication_object [, ...] +ALTER PUBLICATION name DROP publication_drop_object [, ...] ALTER PUBLICATION name SET ( publication_parameter [= value] [, ... ] ) ALTER PUBLICATION name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER } ALTER PUBLICATION name RENAME TO new_name @@ -32,6 +32,11 @@ ALTER PUBLICATION name RENAME TO table_name [ * ] [ ( column_name [, ... ] ) ] [ WHERE ( expression ) ] [, ... ] TABLES IN SCHEMA { schema_name | CURRENT_SCHEMA } [, ... ] + +where publication_drop_object is one of: + + TABLE [ ONLY ] table_name [ * ] [, ... ] + TABLES IN SCHEMA { schema_name | CURRENT_SCHEMA } [, ... ] @@ -57,8 +62,7 @@ ALTER PUBLICATION name RENAME TO DROP TABLES IN SCHEMA will not drop any schema tables that were specified using FOR TABLE/ - ADD TABLE, and the combination of DROP - with a WHERE clause is not allowed. + ADD TABLE.