On Fri, Nov 5, 2021 at 7:49 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > 2. > +preprocess_pubobj_list(List *pubobjspec_list, core_yyscan_t > yyscanner, bool alter_drop) > { > ListCell *cell; > PublicationObjSpec *pubobj; > @@ -17341,7 +17359,15 @@ preprocess_pubobj_list(List *pubobjspec_list, > core_yyscan_t yyscanner) > errcode(ERRCODE_SYNTAX_ERROR), > errmsg("invalid table name at or near"), > parser_errposition(pubobj->location)); > - else if (pubobj->name) > + > + /* cannot use WHERE w-filter for DROP TABLE from publications */ > + if (pubobj->pubtable && pubobj->pubtable->whereClause && alter_drop) > + ereport(ERROR, > + errcode(ERRCODE_SYNTAX_ERROR), > + errmsg("invalid use of WHERE row-filter in ALTER PUBLICATION ... DROP > TABLE"), > + parser_errposition(pubobj->location)); > + > > This change looks a bit ad-hoc to me. Can we handle this at a later > point of time in publicationcmds.c? >
Fixed in v38-0001 [1]. ------ [1] https://www.postgresql.org/message-id/CAHut%2BPvWCS%2BW_OLV60AZJucY1RFpkXS%3DhfvYWwpwyMvifdJxiQ%40mail.gmail.com Kind Regards, Peter Smith. Fujitsu Australia