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 1o4MUT-0002B7-8X for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jun 2022 13:03:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o4MUS-0007DO-0X for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jun 2022 13:03:20 +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 1o4MUQ-0007AN-Nm for pgsql-hackers@lists.postgresql.org; Thu, 23 Jun 2022 13:03:19 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4MUN-0002Hd-VO for pgsql-hackers@lists.postgresql.org; Thu, 23 Jun 2022 13:03:17 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 480FB3200972; Thu, 23 Jun 2022 09:03:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 23 Jun 2022 09:03:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1655989390; x=1656075790; bh=K rjaRHoiAhZPtNGwifuWXemZVENpU3jxhPNGOy8k2kE=; b=dIH3AALfwh7SxtZdV PBWSrlAcIy3ssmYG64U/4sRE5E2U80pnykm8UKdtgSQoliuPl0HCFq4dk6onjw1R jzlRmAdI+meWHR/dUErdG9kbHnuO8W4hTqw2KIPn26c8X61rdZ6ZvakKYbwFCRBX qXMgSHuTYphoDCCwAJqzjZ0c8nyL1NJMXa6PyRyGWr296wo77jxgvdDjmkEMPaxd I9I7yfJOHskfuPW820KjFmSH/AW7tLhlfx+95KzKPxzDvx8NvNC7BOpfXzkqvn3B zymZ2kC2rnTiPUcHsG+GCnrDKFfG7fCGvJ8lO1SvFcw2EOxmj/wrWnBC3MFtrXE6 bUMhA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefjedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Jun 2022 09:03:10 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 16C16352; Thu, 23 Jun 2022 14:43:56 +0200 (CEST) Date: Thu, 23 Jun 2022 14:43:56 +0200 From: Alvaro Herrera To: "houzj.fnst@fujitsu.com" Cc: Zheng Li , Amit Kapila , Masahiko Sawada , Japin Li , Dilip Kumar , rajesh singarapu , PostgreSQL Hackers Subject: Re: Support logical replication of DDLs Message-ID: <20220623124356.gkndavscdkyg4pqq@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 2022-Jun-15, houzj.fnst@fujitsu.com wrote: > On Wednesday, June 15, 2022 8:14 AM Zheng Li wrote: > > How does the deparser deparses CREATE FUNCTION STATEMENT? Will it > > schema qualify > > objects inside the function definition? > > The current deparser doesn't schema qualify objects inside the function > source as we won't know the schema of inner objects until the function is > executed. The deparser will only schema qualify the objects around > function declaration Like: > > CREATE FUNCTION [public].test_func(i [pg_catalog].int4 ) RETURNS [pg_catalog].int4 LANGUAGE plpgsql Right, this is by design. There is no way to deparse a function body -- as far as the backend is concerned, the body is just an opaque string. That string is to be interpreted by the language handler only. I don't know if it's possible to do different for non-core PLs, but I do not think we have to worry about them in the Postgres implementation. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "La victoria es para quien se atreve a estar solo"