Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(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-19 22:18:59
Message-ID: CAHut+PuAeuz+Fp=iVnve4TFaGWTceanOzNH-AKBoJbz_j+FaiA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Fuji-San.

Thanks for your suggestions! I've attached a new patch v6 to incorporate them.

On Thu, Nov 20, 2025 at 4:50 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Tue, Nov 18, 2025 at 5:27 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> > Thanks for addressing the comments. V5 looks good to me.
>
> Thanks both for the patch and review!
>
> -<phrase>where <replaceable
> class="parameter">all_publication_object</replaceable> is one
> of:</phrase>
> + <phrase>where <replaceable
> class="parameter">table_spec</replaceable> is:</phrase>
> +
> + [ ONLY ] <replaceable
> class="parameter">table_name</replaceable> [ * ] [ ( <replaceable
> class="parameter">column_name</replaceable> [, ... ] ) ] [ WHERE (
> <replaceable class="parameter">expression</replaceable> ) ]
> +
> +<phrase>where <replaceable
> class="parameter">publication_all_object</replaceable> is one
> of:</phrase>
>
> In other documentation files (e.g., merge.sgml, analyze.sgml), the definitions
> of each element are chained using "and". For example, in merge.sgml:
>
> where data_source is:
> ...
> and when_clause is:
> ...
> and merge_insert is:
> ...
>
> I think create_publication.sgml and alter_publication.sgml should follow
> the same style for consistency. For example, in create_publication.sgml
> we would have:
>
> where publication_object
> ...
> and publication_all_object
> ...
> and table_spec
> ...

+1. I never noticed this before.

>
> It seems better to put these sections in the same order that the elements
> appear in the syntax. So I placed publication_all_object before table_spec
> in the above example.
>
>
> -<phrase>where <replaceable
> class="parameter">all_publication_object</replaceable> is one
> of:</phrase>
> + <phrase>where <replaceable
> class="parameter">table_spec</replaceable> is:</phrase>
>

OK. Done in v6.

> Regarding terminology: analyze.sgml uses table_and_columns for
> a similar syntax, and personally I think table_and_columns is clearer than
> table_spec.
>

Thanks for the other example usages.

+1 for naming it as 'table_and_columns' to be the same as everywhere else.

Also, to match that, I renamed 'table_spec_drop' to 'table'.

======
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v6-0001-Fix-synopsis.patch application/octet-stream 4.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2025-11-19 22:23:48 Re: vacuumdb: add --dry-run
Previous Message Melanie Plageman 2025-11-19 22:12:49 Re: Checkpointer write combining