Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbfNB-002kTL-31 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jun 2026 14:11:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbfNA-0074hJ-2B for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jun 2026 14:11:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbfNA-0074gk-0i for pgsql-hackers@lists.postgresql.org; Mon, 22 Jun 2026 14:11:36 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wbfN7-00000001bCT-2c1c for pgsql-hackers@lists.postgresql.org; Mon, 22 Jun 2026 14:11:34 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-697764213d6so4003874a12.1 for ; Mon, 22 Jun 2026 07:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782137491; cv=none; d=google.com; s=arc-20240605; b=b9729Sh2sgwx7uDqt80w6HhdYCx1yhFGgoGCWPS/wdwep42rxd9D6W6MAaUByZYr3g zvRPoCS94AoFyKcUFOGK/Rc/YHW7ero0Jl7cOVLwE1yMV1UHFbSeoKAIl+DX6NeCIpWg Ejm2/ixHtNdaBfQCWmD1tK91fRR6smJykgIh1hvoR/RmaxOWxiSZL/leBBdtONt+S4SR Pd3XCySfni/j+qyUDaMLoMx7nGD+Is4T1l/dnhVBLuzUziR9kmZcttOq+P8vwDuBPaXH hUwPSVUuhSegvJrRiy1O9rdHwqTIzScv6G+wNep4QZZvbF2qW7FzbOe2JSeDjYVMpTJ/ /lsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=9+SFhTdUo0CbPv2ksX29JGPxQzb0ZsYkrz1M+adkpug=; fh=CSIpNOygap8vIXVugIFdU2Wk0Ccl/ikW3psGwV6JTs4=; b=bknNdMDD6eCRT0arDb8W5KfQflQftnxiDPRXwB29dg1m47uQqZdOT7tXsfe1tBPc5Y 6myqf5rHNkPLPpTiu2kd7AUeKACBCeOf55w0VN84HtJvoffL711TPec/CBc1LgcrBHX2 T7mHxxQgF7fvlcGehOIjeUv769iZ23MHQIGWQj/lG1QG550cFQ3rIPJjc2hLvi9VtdKM ZT3bBYQ6qvCgTj9EYSmcDsFjR9r6dHzRyYwVh9slt4OyA6wTzWMsWN1nLGyKr510Dsc5 kCj5FucqL5PX534RovSuhj2c8ifKqKz5cFji84oQFmRQRfT82YLjtIhinl3tbo0vUUC6 nLxA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1782137491; x=1782742291; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9+SFhTdUo0CbPv2ksX29JGPxQzb0ZsYkrz1M+adkpug=; b=YxLh8X3X5qw0NM7RWKM1k9cfVfapP2JO8j2UxxXUN/TtllRZOc72KiAktp5d3kYTvm ENGuLyewAR8zCuqExyhLiU5AFKwUiUyAjQXlwVGX4jtLGdYlOP5biMiHeJ7pcqBA2whP tl0Qu2NRpB5HIPMTRdO121KEiRp7NDTPPnI8hAjA0RdmvIQ6avcQp4ffvKGie1BrPBn9 oxusdZtRvB/8zY5MVxiBK9VVQ9XSRZTPk0PRrDVxV9Yrbb0J3Y7j8LPoRpc2dg4EUJj2 P2swjocWSIJ+T2bXJC4eaGqWYlZ/VK82sYhrzUi/MEynJDZhp/XEfj2uxEgSoSMIQi6Z IElQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782137491; x=1782742291; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9+SFhTdUo0CbPv2ksX29JGPxQzb0ZsYkrz1M+adkpug=; b=CkI8O4auF7xqeSz3sy24YQDsd+Ykb3wCBUhvVypSxHptWZq2p5gCCBjHeCJFMy/kB4 Q1AyEFfgxLlRlF0Hd6CjwQHxikv/TkP8IKVC452ylnNp/OIgDzs3XdZmKwNcEutXhF5C TAekeIlPqK5qwvYwLXTsqPZwdrFvEWrW8A8pV46D3eYoyS7LuSJfowFel6fdkYzl01m/ z2F9gZuB51YZ3jPSXCAlnwYUeA7R84NHoF0NeLKdzGq2dmC+Lah/+UQf19ofeqBzXBRE ULioQb0g4YAobrmT41ZT6n82Y9nWRic84zp52T4thzz1zl9BrLWbjj5efVPfwdTKcddW 5ENA== X-Forwarded-Encrypted: i=1; AFNElJ8OTtrVSnMhG3cLtEbS7DHBYWluVH3nNO0kUjWcqjrmCgCDqcyjKrlfba/ZNIGoj2pj0/Kx4vsPSFfHuIwp@lists.postgresql.org X-Gm-Message-State: AOJu0Yyj0lLZ//P3ylYwy2URuuX//Y931dIrR04HtP+RyNKLQUKWT7mp cNIk6T6/fohDg3fQo6qlaIY2GXpFqXwGX8T15oc6W5ATN/WzK/sd3zPtQ0b2N68l0N71vrrF5jg COcD/YzcvoV/Sj1NuMLMb9suQE989JOwKiyTo+Bk5 X-Gm-Gg: AfdE7ckzuPvoqcE50H7omYNEMy+tZtTRllL6XqMBtWvXfEzArNN3lnf6ixbnZxCPEps 7QmevueZJD8v62KPSeQI4am9L4tKdPgNdQJ52Gu3zHVMvjKIX/+cp3iv9oeDK4TUJ2VAiGZFj2x hiCy07guLw7CO1EEVv5waVcLnW47lOUXi27shV+wIrGJpdOXv/OPyhWDLMBEz8NFL222AWruaDo BkGzthVuXsf3i1d9XHexZAhq9RuZksQml6KcEGkUOCMhzzSoaI5XSlsBfN8FXF26hrcDLmQlw== X-Received: by 2002:a17:907:706:b0:c08:586c:84b6 with SMTP id a640c23a62f3a-c097ae06c96mr755591966b.7.1782137490635; Mon, 22 Jun 2026 07:11:30 -0700 (PDT) MIME-Version: 1.0 References: <983C7B03-D9C3-4F15-8913-7616EC5E6414@gmail.com> In-Reply-To: From: Akshay Joshi Date: Mon, 22 Jun 2026 19:41:18 +0530 X-Gm-Features: AVVi8Cc1mPtpikxgZQFkGaC1NH4rMbmiukTWAczzAHJRXy7NtlUALv5MPLb8PiU Message-ID: Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements To: Chao Li Cc: Zsolt Parragi , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000120dbe0654d83863" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000120dbe0654d83863 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 22, 2026 at 7:30=E2=80=AFPM Chao Li wr= ote: > > > > On Jun 22, 2026, at 20:40, Akshay Joshi > wrote: > > > > You're right, and thanks for spotting this. The existing pattern in > pg_proc.dat for variadic-text functions (e.g., jsonb_delete, > json_extract_path) uses _text at the variadic position in both proargtype= s > and proallargtypes, with provariadic =3D> 'text'. That is the convention > documented by the sanity check in src/test/regress/sql/opr_sanity.sql. > > > > The same issue applies to pg_get_role_ddl, pg_get_tablespace_ddl (both > variants), and pg_get_database_ddl, but that will require a separate patc= h. > > > > Thanks for confirming. Then I will file a patch tomorrow to fix those. > I started working on it, but if you want to take the lead, just let me know and I won't send my version over > > Best regards, > -- > Chao Li (Evan) > HighGo Software Co., Ltd. > https://www.highgo.com/ > > > > > --000000000000120dbe0654d83863 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jun 22,= 2026 at 7:30=E2=80=AFPM Chao Li <li.evan.chao@gmail.com> wrote:


> On Jun 22, 2026, at 20:40, Akshay Joshi <akshay.joshi@enterprisedb.com&= gt; wrote:
>
> You're right, and thanks for spotting this. The existing pattern i= n pg_proc.dat for variadic-text functions (e.g., jsonb_delete, json_extract= _path) uses _text at the variadic position in both proargtypes and proallar= gtypes, with provariadic =3D> 'text'. That is the convention doc= umented by the sanity check in src/test/regress/sql/opr_sanity.sql.
>
> The same issue applies to pg_get_role_ddl, pg_get_tablespace_ddl (both= variants), and pg_get_database_ddl, but that will require a separate patch= .
>

Thanks for confirming. Then I will file a patch tomorrow to fix those.
<= /blockquote>

=C2=A0 =C2=A0I started working on it, but if you want = to take the lead, just let me know and I won't send my version over=C2= =A0

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
ht= tps://www.highgo.com/




--000000000000120dbe0654d83863--