RE: Added schema level support for publication.
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
To: vignesh C <vignesh21@gmail.com>
Cc: 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>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>
Date: 2021-07-22T03:42:10Z
Lists: pgsql-hackers
On July 22, 2021 1:30 AM vignesh C <vignesh21@gmail.com> wrote
> > I think PubType in this case should be 't' instead of 'e'. Please have a look.
>
> Thanks for reporting this issue, this issue is fixed in the attached v13 patch.
> I have changed relation name pg_publication_schema to pg_publication_sch
> so that the names are in similar lines with pg_publication_rel relation and similar
> changes were done for variable names too.
Hi,
Thanks for the new version patches.
I had a few comments.
1)
+
+ appendPQExpBuffer(query, "ALTER PUBLICATION %s ", fmtId(pubrinfo->pubname));
+ appendPQExpBuffer(query, "ADD SCHEMA %s;\n", fmtId(schemainfo->dobj.name));
+
It seems we can combine these two function call.
like appendPQExpBuffer(query, "ALTER PUBLICATION %s ADD SCHEMA %s;\n",
fmtId(pubrinfo->pubname),
fmtId(schemainfo->dobj.name));
2)
+ footers[0] = pstrdup("Publications:");
+
This word seems need to be translated.
footers[0] = pstrdup(_("Publications:"));
3)
I think it might be better to add a testcase to cover the issue
reported before [1].
[1] https://www.postgresql.org/message-id/CAJcOf-dsKOYKmdrU5nwWeFoHvhiACbmw_KU%3DJQMEeDp6WwijqA%40mail.gmail.com
4)
Personally, the new name pg_publication_sch is not very easy to understand.
(Maybe it's because I am not a native english speaker. If others feel ok,
please ignore this comment)
Best regards,
Houzj
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