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 1vsrch-0059kE-2k for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 00:10:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsrcg-0015G2-2X for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 00:10:26 +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 1vsrcg-0015Fu-1e for pgsql-hackers@lists.postgresql.org; Thu, 19 Feb 2026 00:10:26 +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 1vsrcd-000000003am-2MnB for pgsql-hackers@lists.postgresql.org; Thu, 19 Feb 2026 00:10:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 61J0AJi92291233; Wed, 18 Feb 2026 19:10:19 -0500 From: Tom Lane To: Haritabh Gupta cc: pgsql-hackers@lists.postgresql.org, Florin Irion , Tim Waizenegger Subject: Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement In-reply-to: <177145861697.626.9698606909114409697.pgcf@coridan.postgresql.org> References: <177145861697.626.9698606909114409697.pgcf@coridan.postgresql.org> Comments: In-reply-to Haritabh Gupta message dated "Wed, 18 Feb 2026 23:50:16 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2291231.1771459819.1@sss.pgh.pa.us> Date: Wed, 18 Feb 2026 19:10:19 -0500 Message-ID: <2291232.1771459819@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Haritabh Gupta writes: > Thanks for addressing the comments. I tested v7 and found that > type modifiers (typmod) are lost in the base type output. This report crystallized something that's been bothering me about not only pg_get_domain_ddl() but all the similar patches that are in the queue. They are adding a large amount of new code that will have to be kept in sync with behavior elsewhere, and there is basically zero forcing function to ensure that that happens. Even the rather-overly-voluminous test cases proposed for the functions cannot catch errors of omission, especially not future errors of omission. I don't really know what to do about this, but I don't like the implementation approach that's being proposed. I think it's loading too much development effort and future maintenance effort onto us in comparison to the expected benefit of having these functions. regards, tom lane