pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: houzj.fnst@fujitsu.com <houzj.fnst@fujitsu.com>
Cc: Zheng Li <zhengli10@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Japin Li <japinli@hotmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: rajesh singarapu <rajesh.rs0541@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Support logical replication of DDLs
Date: Thu, 23 Jun 2022 14:43:56 +0200
Message-ID: <20220623124356.gkndavscdkyg4pqq@alvherre.pgsql> (raw)
In-Reply-To: <OS0PR01MB571688CA7CAAE8B01089311294AD9@OS0PR01MB5716.jpnprd01.prod.outlook.com>

On 2022-Jun-15, houzj.fnst@fujitsu.com wrote:

> On Wednesday, June 15, 2022 8:14 AM Zheng Li <zhengli10@gmail.com> 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"





view thread (449+ messages)  latest in thread

Message-ID: <20220623124356.gkndavscdkyg4pqq@alvherre.pgsql>
Permalink:  ../20220623124356.gkndavscdkyg4pqq@alvherre.pgsql/
Also on:    postgresql.org/message-id/20220623124356.gkndavscdkyg4pqq@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: alvherre@alvh.no-ip.org, houzj.fnst@fujitsu.com, zhengli10@gmail.com, amit.kapila16@gmail.com, sawada.mshk@gmail.com, japinli@hotmail.com, dilipbalaut@gmail.com, rajesh.rs0541@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Support logical replication of DDLs
  In-Reply-To: <20220623124356.gkndavscdkyg4pqq@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox