On Thu, 30 Jul 2026 at 07:52, Hayato Kuroda (Fujitsu) <[email protected]> wrote: > > Dear Shlok, > > > Thanks for reviewing the patch. I have updated the patch and attached > > the v2 patch. > > Thanks for the update. According to others, different kinds of statements > should be > different else-if statements. So we may have to be something like below: > > ``` > else if (stmt->kind == ALTER_SUBSCRIPTION_REFRESH_PUBLICATION) > { > ... > } > else if (stmt->kind == ALTER_SUBSCRIPTION_ADD_PUBLICATION || > stmt->kind == ALTER_SUBSCRIPTION_DROP_PUBLICATION || > stmt->kind == ALTER_SUBSCRIPTION_SET_PUBLICATION) > { > if (IsSet(opts.specified_opts, SUBOPT_REFRESH) && > opts.refresh) > ... > } > ``` > I have modified the code as per your suggestions.
But, for ALTER SUBSCRIPTION ... ADD/DROP/SET PUBLICATION by default 'refresh' option is true. So even if the refresh option is not specified explicitly, we should validate the server. So instead of "if (IsSet(opts.specified_opts, SUBOPT_REFRESH) && opts.refresh)", I have used "if(opts.refresh)". Please let me know if I am missing something. Attached the updated patch. Thanks, Shlok Kyal
v3-0001-Check-foreign-server-permissions-for-ALTER-SUBSCR.patch
Description: Binary data
