CREATE/ALTER PUBLICATION improvements for syntax synopsis
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-12T03:36:16Z
Lists: pgsql-hackers
Attachments
- v1-0001-Add-curly-brackets-before-ellipsis.patch (application/octet-stream) patch v1-0001
During some recent reviews in this area, I noticed both CREATE/ALTER
PUBLICATION synopses say:
----------
where publication_object is one of:
TABLE [ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [
WHERE ( expression ) ] [, ... ]
TABLES IN SCHEMA { schema_name | CURRENT_SCHEMA } [, ... ]
----------
IMO it would be better to include another pair of { } preceding the
TABLE ellipsis:
a) for consistency with the second (TABLES IN SCHEMA) case
b) to help remove ambiguity, what part of the syntax the TABLE ellipsis is for
e.g.
----------
TABLE { [ ONLY ] table_name [ * ] [ ( column_name [, ... ] ) ] [
WHERE ( expression ) ] } [, ... ]
TABLES IN SCHEMA { schema_name | CURRENT_SCHEMA } [, ... ]
----------
I attached a v1 patch to do this.
Thoughts?
======
Kind Regards,
Peter Smith.
Fujitsu Australia
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