On Mon, Mar 20, 2023 at 1:02 PM Peter Smith <smithpb2250@gmail.com> wrote:
>
>
> 2. pg_get_publication_tables
>
> + else
> + {
> + List *relids,
> + *schemarelids;
> +
> + relids = GetPublicationRelations(pub_elem->oid,
> + pub_elem->pubviaroot ?
> + PUBLICATION_PART_ROOT :
> + PUBLICATION_PART_LEAF);
> + schemarelids = GetAllSchemaPublicationRelations(pub_elem->oid,
> + pub_elem->pubviaroot ?
> + PUBLICATION_PART_ROOT :
> + PUBLICATION_PART_LEAF);
> + pub_elem_tables = list_concat_unique_oid(relids, schemarelids);
> + }
>
> 2a.
> Maybe 'schema_relids' would be a better name than 'schemareliids'?
>
> ~
>
> 2b.
> By introducing another variable maybe you could remove some of this
> duplicated code.
>
> PublicationPartOpt root_or_leaf = pub_elem->pubviaroot ?
> PUBLICATION_PART_ROOT : PUBLICATION_PART_LEAF;
>
IIUC, 2b is an existing code, so I would prefer not to change that as
part of this patch. Similarly, for other comments, unless something is
a very clear improvement and makes difference w.r.t this patch, it
makes sense to change that, otherwise, let's focus on the current
issue.
--
With Regards,
Amit Kapila.