RE: Functions 'is_publishable_class' and 'is_publishable_relation' should stay together.

From: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: RE: Functions 'is_publishable_class' and 'is_publishable_relation' should stay together.
Date: 2022-07-30 13:29:20
Message-ID: OS0PR01MB5716AB28EB6E849654C1009194989@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday, July 30, 2022 7:25 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Jul 29, 2022 at 3:55 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Fri, Jul 29, 2022 at 3:29 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
> wrote:
> > >
> > > Well, I checked the commit and the functions I was talking about
> > > look OK now. However, looking again, pg_relation_is_publishable is
> > > in the wrong place (should be right below is_publishable_relaton),
> > > and I wonder why aren't get_publication_oid and get_publication_name in
> lsyscache.c.
> > >
> >
> > Right, both these suggestions make sense to me. Similarly, I think
> > functions get_subscription_name and get_subscription_oid should also
> > be moved to lsyscache.c.
> >
>
> Attached, find a patch to address the above comments.
>
> Note that (a) I didn't change the comment atop pg_relation_is_publishable to
> refer to the actual function name instead of 'above' as it seems it can be an SQL
> variant for both the above functions. (b) didn't need to include pg_publication.h
> in lsyscache.c even after moving code to that file as the code is compiled even
> without that.

The patch LGTM. I also ran the headerscheck and didn't find any problem.

Best regards,
Hou Zhijie

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-07-30 14:24:39 Re: Inconvenience of pg_read_binary_file()
Previous Message houzj.fnst@fujitsu.com 2022-07-30 13:13:52 RE: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger