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 1x4MCT-0075kg-1v for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 17:35:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4MCS-00GuOs-1j for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 17:35:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x4MCS-00GuOk-0l for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 17:35:08 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x4MCP-00000003oU0-2pya for pgsql-hackers@postgresql.org; Wed, 09 Sep 2026 17:35:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 689HYxTo640140; Wed, 9 Sep 2026 13:34:59 -0400 From: Tom Lane To: Noah Misch cc: Andrew Dunstan , Melanie Plageman , gonzalemario@gmail.com, dbryan.green@gmail.com, euler@eulerto.com, pgsql-hackers@postgresql.org Subject: Re: pg_get_*_ddl() needs a redesign In-reply-to: <20260909172132.0a.noahmisch@microsoft.com> References: <20260827015242.54.noahmisch@microsoft.com> <20260909172132.0a.noahmisch@microsoft.com> Comments: In-reply-to Noah Misch message dated "Wed, 09 Sep 2026 10:21:32 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <640138.1788975299.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 09 Sep 2026 13:34:59 -0400 Message-ID: <640139.1788975299@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > I want to clarify one thing before you spend much time on fixes. I don'= t see > "fixes" addressing this thread as a whole, unless you plan to dispute th= e > premise that the feature needs a redesign. In other words, I think the = thread > outcome should be one of these: > - My review erred in determining that the feature needs a redesign. The > design is sound and should proceed, possibly with some fixes. > - Revert the feature. FWIW, I agree with Noah's point that having two independent implementations of SQL reverse compilation is not really a place we want to be: it will be a major PITA for future development. Unfortunately, I see no practical way to have pg_dump share code with the backend for most of this stuff; not least because pg_dump has to support dumping from old backends that won't have any such feature. So we either swallow that duplication or decide that we're never going to support this in the backend. Neither choice is palatable, but I don't think I want to be forced into the duplicative approach when we've not explored other alternatives (such as refactoring pg_dump to expose its internal logic in some way). regards, tom lane