CREATE/ALTER PUBLICATION improvements for syntax synopsis

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: CREATE/ALTER PUBLICATION improvements for syntax synopsis
Date: 2025-08-12 03:36:16
Message-ID: CAHut+PtsyvYL3KmA6C8f0ZpXQ=7FEqQtETVy-BOF+cm9WPvfMQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-Add-curly-brackets-before-ellipsis.patch application/octet-stream 2.4 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2025-08-12 03:48:20 Re: [WIP]Vertical Clustered Index (columnar store extension) - take2
Previous Message Sandino Araico Sánchez 2025-08-12 03:31:06 Re: Proposal to adjust typmod argument on base UDT input functions