Re: Added schema level support for publication.
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Masahiko Sawada <sawada.mshk@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Peter Smith <smithpb2250@gmail.com>,
"tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, Greg Nancarrow <gregn4422@gmail.com>, Ajin Cherian <itsajin@gmail.com>, Rahila Syed <rahilasyed90@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: 2021-09-14T04:28:01Z
Lists: pgsql-hackers
On Mon, Sep 13, 2021 at 5:11 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Sun, Sep 12, 2021 at 8:43 PM vignesh C <vignesh21@gmail.com> wrote:
> >
> > Thanks for the changes, the suggested changes make the parsing code
> > simpler. I have merged the changes to the main patch. Attached v27
> > patch has the changes for the same.
> >
>
> +pubobj_name: ColId { $$ = list_make1(makeString($1)); }
> + | ColId indirection { $$ = lcons(makeString($1), $2); }
> ;
>
> I think "ColId indirection" should handle catalog and schema name as
> we are doing in qualified_name. See attached (this can be applied atop
> v27-0002). The one other improvement we can do here is to extract the
> common code from qualified_name (especially for "ColId indirection")
> and pubobj_name. What do you think?
>
One more suggestion for changes in gram.y:
@@ -12430,7 +12476,14 @@ relation_expr:
$$->inh = true;
$$->alias = NULL;
}
- | qualified_name '*'
+ | special_relation_expr
+ {
+ $$ = $1;
+ }
+ ;
+
+special_relation_expr:
+ qualified_name '*'
I am not sure if naming the above rule as special_relation_expr is a
good idea. Can we name it as extended_relation_expr?
--
With Regards,
Amit Kapila.
Commits
-
Include schema/table publications even with exclude options in dump.
- 4aa6fa3cd0a2 18.0 landed
-
Rename some enums to use TABLE instead of REL.
- b3812d0b9bcf 15.0 landed
-
Add tap tests for the schema publications.
- 6b0f6f79eef2 15.0 landed
-
Allow publishing the tables of schema.
- 5a2832465fd8 15.0 landed
-
In pg_dump, use simplehash.h to look up dumpable objects by OID.
- 92316a4582a5 15.0 cited