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 1pS9Tq-0007lw-K7 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 04:33:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pS9To-0004xS-Rw for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 04:33:16 +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 1pS9To-0004xJ-Fy for pgsql-hackers@lists.postgresql.org; Wed, 15 Feb 2023 04:33:16 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pS9Tm-000617-1Q for pgsql-hackers@lists.postgresql.org; Wed, 15 Feb 2023 04:33:15 +0000 Received: by mail-lf1-x129.google.com with SMTP id v17so26148608lfd.7 for ; Tue, 14 Feb 2023 20:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JykPQYk5hGMuqaE0Gei+PF2AUcpCkscdclEje/xKK0A=; b=GEX/qOENpnFfx1M59em4XJBurvVw2wwWUZskTjqq0De42OOtxJEl2TXukrDF+3EWIW Ua//cFN4k81QsqZx+Ddmc/15mRtaw0EbYVRCIOkb563rXPgAL47bJLmXtmA3DSDoJ6PE jVwbx96VVMN9p2vfag53tU6ovlu8P2XQzUq0CCqHyKgSL3OST+xX4lbjMjbTF6w0eqYY nAs623b0IeEyFm3yUtVpgT+tE81wqKWPbfgOID8AY69CdT37Tx+mh7kSQv6CU/GVxQrp Tzhs/EDcf20E29DZF+YSAigiR3q+Oa9QICAAkqcI3EihFbvyUzw6NHKWwwilykr0rbDP 805g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JykPQYk5hGMuqaE0Gei+PF2AUcpCkscdclEje/xKK0A=; b=Z12wpVXuKgcq3fd5nJYZ8Z0Qhzp2bLXjpTLKnPLVBwlvolQQh7TntRY++0lLiy0HdG c37UDgh1weJAVNFr0jE0Zu7NgX02HsL4AqJdbtAD3g3IZflTDFR4cBISe4mXoYVE3zcr BF+UyhatPmeE7jq7aBBThRfxz0PoxZsnhfKe2USb7Tr62i65eSaPqWgkfcF2xqppT+Hm 2NF44YXVhHTBGR+yxM3T4QtO5BnqqqVLlyeFGAHkT8SkYiGC08pLQdWX2Fp1alj3Lpbu BWE8rshl5VOyOo76LVh9fIapoH4Fi+H99zX+ubvzNHgi2nf2H2ZHUffvFxmkz+Q7eMbq 8v/w== X-Gm-Message-State: AO0yUKVuCFrhK6GScmy6hj2sXLbG4ZpPyD7Qzj3xbAtKGDT8JYf3Clzw 9x01ijgO3E/q5ZRNAH3EPopmOECZBMLnqrHarpo= X-Google-Smtp-Source: AK7set+jgedo+Crbl9eQlRX68okVN8EVKvO9lr0+P2nBmug9d2yO7oRx7OTKIX3IsxYJokB74X0MUQPIhp1oeWgoZwc= X-Received: by 2002:ac2:46e4:0:b0:4d5:ca42:aee1 with SMTP id q4-20020ac246e4000000b004d5ca42aee1mr120651lfo.1.1676435591388; Tue, 14 Feb 2023 20:33:11 -0800 (PST) MIME-Version: 1.0 References: <20221006171601.6um4ey5idm4h62vf@alvherre.pgsql> In-Reply-To: From: Peter Smith Date: Wed, 15 Feb 2023 15:32:53 +1100 Message-ID: Subject: Re: Support logical replication of DDLs To: Ajin Cherian Cc: vignesh C , Zheng Li , li jie , Dilip Kumar , Alvaro Herrera , "houzj.fnst@fujitsu.com" , Amit Kapila , Masahiko Sawada , Japin Li , rajesh singarapu , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 9, 2023 at 8:55 PM Ajin Cherian wrote: > > On Fri, Feb 3, 2023 at 11:41 AM Peter Smith wrote: > > > > Here are some review comments for patch v63-0001. > > > > ====== > > src/backend/catalog/aclchk.c > > > > 3. ExecuteGrantStmt > > > > + /* Copy the grantor id needed for DDL deparsing of Grant */ > > + istmt.grantor_uid = grantor; > > + > > > > SUGGESTION (comment) > > Copy the grantor id to the parsetree, needed for DDL deparsing of Grant > > > > didn't change this, as Alvaro said this was not a parsetree. Perhaps there is more to do here? Sorry, I did not understand the details of Alvaro's post [1], but I did not recognize the difference between ExecuteGrantStmt and ExecSecLabelStmt so it was my impression either one or both of these places are either wrongly commented, or maybe are doing something that should not be done. > > ====== > > src/backend/utils/adt/regproc.c > > > > 9. > > + > > +/* > > + * Append the parenthesized arguments of the given pg_proc row into the output > > + * buffer. force_qualify indicates whether to schema-qualify type names > > + * regardless of visibility. > > + */ > > +static void > > +format_procedure_args_internal(Form_pg_proc procform, StringInfo buf, > > + bool force_qualify) > > +{ > > + int i; > > + char* (*func[2])(Oid) = {format_type_be, format_type_be_qualified}; > > + > > + appendStringInfoChar(buf, '('); > > + for (i = 0; i < procform->pronargs; i++) > > + { > > + Oid thisargtype = procform->proargtypes.values[i]; > > + char *argtype = NULL; > > + > > + if (i > 0) > > + appendStringInfoChar(buf, ','); > > + > > + argtype = func[force_qualify](thisargtype); > > + appendStringInfoString(buf, argtype); > > + pfree(argtype); > > + } > > + appendStringInfoChar(buf, ')'); > > +} > > > > 9a. > > Assign argtype = NULL looks redundant because it will always be > > overwritten anyhow. > > > > changed this. > > > ~ > > > > 9b. > > I understand why this function was put here beside the other static > > functions in "Support Routines" but IMO it really belongs nearby (i.e. > > directly above) the only caller (format_procedure_args). Keeping both > > those functional together will improve the readability of both, and > > will also remove the need to have the static forward declaration. > > There was no reply for 9b. Was it accidentally overlooked, or just chose not to do it? ------ [1] https://www.postgresql.org/message-id/20230213090752.27ftbb6byiw3qcbl%40alvherre.pgsql Kind Regards, Peter Smith. Fujitsu Australia