Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-18T05:31:12Z
Lists: pgsql-hackers
Attachments
- v5-0001-Fix-synopsis.patch (application/octet-stream) patch v5-0001
On Mon, Nov 17, 2025 at 5:49 PM Chao Li <li.evan.chao@gmail.com> wrote: ... > > #1. > > My original change, to fix the [, ...] grouping to remove ambiguity. > > > > #2 > > Now renames "all_publication_object" to "publication_all_objects". > > This is a simple name change that does not affect anything. I felt > > everything ought to have the prefix of the object it belongs to (e.g. > > "publication_name", "publication_parameter", "table_name", > > "schema_name", column_name" all follow this rule, but prefix "all_" > > was the odd-one-out). > > > > I don’t like this renaming. Or at lease don’t use plural. > > > #3 > > Rearranged the synopsis order from general to detailed. Again, there > > is no functional difference; I just felt it was better to use the > > natural logical order: e.g., "publication_all_objects" > > > "publication_object" > > > > I think PG doc usually place the most common form first. For publications, TABLE is used far more than TABLES IN SCHEMA. For example, if you look at https://www.postgresql.org/docs/18/sql-grant.html, it doesn’t follow the general->detailed rule. > PSA v5 with some changes per your v4 review: #1. This is the original fix for the [, ...] grouping to remove ambiguity. I also noticed a missing object for the ALTER DROP case, so I added that as well. So now there are names: - table_spec - table_spec_drop Got any better suggestions? #2 Removed the plural -- now "publication_all_object" #3 I didn't recognise that the synopsis was already in order of "common usage", so I discarded my idea to reorder it. ====== 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