Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis
Date: 2025-11-18 08:26:32
Message-ID: 580BD8D5-1A6E-44C8-928E-D241699B07D6@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Nov 18, 2025, at 13:31, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Mon, Nov 17, 2025 at 5:49 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)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.
>

Thanks for addressing the comments. V5 looks good to me.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2025-11-18 08:41:45 Why is_admin_of_role() use ROLERECURSE_MEMBERS rather than ROLERECURSE_PRIVS?
Previous Message Hayato Kuroda (Fujitsu) 2025-11-18 08:16:18 RE: Parallel Apply