From: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | Greg Nancarrow <gregn4422(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Smith <smithpb2250(at)gmail(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Subject: | RE: Added schema level support for publication. |
Date: | 2021-09-27 06:45:50 |
Message-ID: | OS0PR01MB5716D9115B21D6A2D744936C94A79@OS0PR01MB5716.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Monday, September 27, 2021 12:32 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> On Fri, Sep 24, 2021 at 11:46 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
>
> Attached v33 patch has the preprocess_pubobj_list review comment fix
> suggested by Alvaro at [1]. The
> v33-0006-Alternate-grammar-for-ALL-TABLES-IN-SCHEMA.patch patch has
> the grammar changes as suggested by Alvaro at [1]. If we agree this is better, I
> will merge this into the 0001 patch.
> [1] - https://www.postgresql.org/message-id/202109241325.eag5g6mpvoup%40alvherre.pgsql
Hi,
The grammar change basically looks good to me. Only one suggestion is that it
will be better to add some more comments in gram.y to describe the rule
PublicationObjSpec. Because it's a new style syntax in postgresql, people might
wonder how the code work and why we choose this design when they first time
see this rule in gram.y.
Maybe something like the following:
+/*
+ * FOR TABLE and FOR ALL TABLES IN SCHEMA specifications
+ *
+ * This rule parses publication object with and without keyword prefix.
+ *
+ * The actual type of the object without keyword prefix depends on the previous
+ * one with keyword prefix. It will be preprocessed in preprocess_pubobj_list().
+ *
+ * For the object without keyword prefix, we cannot just use relation_expr here,
+ * because some extended expression in relation_expr cannot be used as a
+ * schemaname and we cannot differentiate it. So, we extract the rules from
+ * relation_expr here.
+ */
PublicationObjSpec:
TABLE relation_expr
...
My words might not be good, but I think it will be better to add some comments
to explain a bit about the code in gram.y. Thoughts ?
Best regards,
Hou zj
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2021-09-27 06:53:23 | Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints |
Previous Message | Michael Paquier | 2021-09-27 06:43:52 | Re: Timeout failure in 019_replslot_limit.pl |