On Tue, 15 Sept 2026 at 16:05, Amit Kapila <[email protected]> wrote: > > On Tue, Sep 15, 2026 at 2:01 PM vignesh C <[email protected]> wrote: > > > > > > The attached v2 version patch has the changes for the same. This also > > addresses Hou's comments from [1]. > > > > --- a/src/include/nodes/parsenodes.h > +++ b/src/include/nodes/parsenodes.h > @@ -2416,6 +2416,7 @@ typedef enum ObjectType > OBJECT_POLICY, > OBJECT_PROCEDURE, > OBJECT_PUBLICATION, > + OBJECT_PUBLICATION_EXCLUDED_REL, > > I was trying to evaluate whether the above change needs catversion > bump and reached conclusion that it doesn't need one because we never > store this enum on-disk as part of parse-trees. Do let me know if you > or others thinks differently. > > * > static ObjectAddress > get_object_address_publication_rel(List *object, > - Relation *relp, bool missing_ok) > + Relation *relp, bool missing_ok, > + bool pubrel_is_exclusion) > > It is better to use objtype here instead of boolean as we already use > at few other places. > > * > + if (!missing_ok) > + { > + if (pubrel_is_exclusion) > + ereport(ERROR, > + (errcode(ERRCODE_UNDEFINED_OBJECT), > + errmsg("publication excluded relation \"%s\" from publication \"%s\" > does not exist", > + RelationGetRelationName(relation), pubname))); > + else > ereport(ERROR, > (errcode(ERRCODE_UNDEFINED_OBJECT), > errmsg("publication relation \"%s\" in publication \"%s\" does not exist", > RelationGetRelationName(relation), pubname))); > > I think these messages are misleading because actually here the object > type is wrong rather than object doesn't exist. > > Please find a top-patch for the above suggestions.
Thanks for the suggestion, here is an updated v3 merged version with the fixes for the same. This patch also addresses Nisha's comments from [1]. [1] - https://www.postgresql.org/message-id/CABdArM5AXL7xN2c7CnUYhUw-kRdMw0WUAxMXMeEjzDV91tVDEw%40mail.gmail.com Regards, Vignesh
v3-0001-Distinguish-publication-exclusions-in-object-addr.patch
Description: Binary data
