Re: Added schema level support for publication.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Greg Nancarrow <gregn4422(at)gmail(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>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Subject: Re: Added schema level support for publication.
Date: 2021-07-23 12:13:42
Message-ID: CALDaNm3DTj535ezfmm8QHLOtOkcHF2ZcCfSjfR=VbTbLZXFRsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 22, 2021 at 9:12 AM houzj(dot)fnst(at)fujitsu(dot)com
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On July 22, 2021 1:30 AM vignesh C <vignesh21(at)gmail(dot)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));
>

Modified.

> 2)
> + footers[0] = pstrdup("Publications:");
> +
>
> This word seems need to be translated.
> footers[0] = pstrdup(_("Publications:"));

Modified

> 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

Added

> 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)

I have changed it to pg_publication_schema as earlier, as Greg also
felt the other name was better.

Thanks for the comments, the attached v14 patch has the fixes for the same.

Regards,
Vignesh

Attachment Content-Type Size
v14-0001-Added-schema-level-support-for-publication.patch text/x-patch 96.5 KB
v14-0002-Tests-and-documentation-for-schema-level-support.patch text/x-patch 47.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-07-23 12:16:30 Re: Added schema level support for publication.
Previous Message John Naylor 2021-07-23 12:05:36 Re: truncating timestamps on arbitrary intervals