Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQrmf-0002lS-J0 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Sep 2021 13:50:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mQrme-0001w9-A8 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Sep 2021 13:50:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQrmd-0001w1-H1 for pgsql-hackers@lists.postgresql.org; Thu, 16 Sep 2021 13:50:36 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQrmb-0004CL-1t for pgsql-hackers@postgresql.org; Thu, 16 Sep 2021 13:50:34 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E081532009A1; Thu, 16 Sep 2021 09:50:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 16 Sep 2021 09:50:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=J7aAA12Gne272Vr28Fd9INmnHKq6RKu6szzONw4MC88=; b=genT/zau MkTljG4VpGlZu+etOY1ulcuPfcUXkDmm2oryiEq9dWjr/zYW8igegDmhteY6DRs/ 2UYfgYJTXF1Gp2g1ol9/I7mrjf5fGfoavmjM/KLZgzXO3KLHjdGm/0JQPOJfa1ay XL/rgphFIzSoE0YuaSh5zU1cyqJv2C98ibt9IFqOeD7HtshDMAVKWLWKJZgFwmzO dV+vzsLv57dmilkDQrJP3gGSI52gQDPa+AQ3lMC/4EzU8+5QrDVRON8LkMRIRzQt /RPwy34jZ9HazEns5f9hwOWMH6to0DcUBZ4c10GFKOZpv+iQY3uKthkFyY0tbKG5 3dOs1wJ2R9SQ4A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehgedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Sep 2021 09:50:28 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D38632A0818; Thu, 16 Sep 2021 10:50:25 -0300 (-03) Date: Thu, 16 Sep 2021 10:50:25 -0300 From: Alvaro Herrera To: vignesh C Cc: Amit Kapila , Rahila Syed , Tomas Vondra , Peter Smith , PostgreSQL-development Subject: Re: Column Filtering in Logical Replication Message-ID: <202109161350.kccziuuu25ex@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Sep-16, vignesh C wrote: > diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y > index e3068a374e..c50bb570ea 100644 > --- a/src/backend/parser/gram.y > +++ b/src/backend/parser/gram.y Yeah, on a quick glance this looks all wrong. Your PublicationObjSpec production should return a node with tag PublicationObjSpec, and pubobj_expr should not exist at all -- that stuff is just making it all more confusing. I think it'd be something like this: PublicationObjSpec: ALL TABLES { $$ = makeNode(PublicationObjSpec); $$->pubobjtype = PUBLICATIONOBJ_ALL_TABLES; $$->location = @1; } | TABLE qualified_name { $$ = makeNode(PublicationObjSpec); $$->pubobjtype = PUBLICATIONOBJ_TABLE; $$->pubobj = $2; $$->location = @1; } | ALL TABLES IN_P SCHEMA name { $$ = makeNode(PublicationObjSpec); $$->pubobjtype = PUBLICATIONOBJ_ALL_TABLES_IN_SCHEMA; $$->pubobj = makeRangeVar( ... $5 ... ); $$->location = @1; } | qualified_name { $$ = makeNode(PublicationObjSpec); $$->pubobjtype = PUBLICATIONOBJ_CONTINUATION; $$->pubobj = $1; $$->location = @1; }; You need a single object name under TABLE, not a list -- this was Tom's point about needing post-processing to determine how to assign a type to a object that's what I named PUBLICATIONOBJ_CONTINUATION here. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Puedes vivir sólo una vez, pero si lo haces bien, una vez es suficiente"