On Tue, 6 Sept 2022 at 09:31, wangw.f...@fujitsu.com
<wangw.f...@fujitsu.com> wrote:
>
> On Tues, 6 Sept 2022 at 11:14, vignesh C <vignes...@gmail.com> wrote:
> > Thanks for the comments, the attached patch has the changes for the same.
>
> Thanks for updating the patch.
>
> Here is one comment for 0001 patch.
> 1. The query in function check_publications_origin.
> +       appendStringInfoString(&cmd,
> +                                                  "SELECT DISTINCT P.pubname 
> AS pubname\n"
> +                                                  "FROM pg_publication P,\n"
> +                                                  "     LATERAL 
> pg_get_publication_tables(P.pubname) GPT\n"
> +                                                  "     LEFT JOIN 
> pg_subscription_rel PS ON (GPT.relid = PS.srrelid),\n"
> +                                                  "     pg_class C JOIN 
> pg_namespace N ON (N.oid = C.relnamespace)\n"
> +                                                  "WHERE C.oid = GPT.relid 
> AND PS.srrelid IS NOT NULL AND P.pubname IN (");
>
> Since I found that we only use "PS.srrelid" in the WHERE statement by
> specifying "PS.srrelid IS NOT NULL", could we just use "[INNER] JOIN" to join
> the table pg_subscription_rel?

Thanks for the comment, the v47 patch attached at [1] has the changes
for the same.
[1] - 
https://www.postgresql.org/message-id/CALDaNm33T%3D23P-GWvy3O7cT1BfHuGV8dosAw1AVLf40MPvg2bg%40mail.gmail.com

Regards,
Vignesh


Reply via email to