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 1x2Zck-005qUX-1E for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Sep 2026 19:30:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x2Zcj-008S6e-1C for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Sep 2026 19:30:53 +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 1x2Zcj-008S6W-0I for pgsql-hackers@lists.postgresql.org; Fri, 04 Sep 2026 19:30:53 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x2Zch-000000041Yn-18iD for pgsql-hackers@lists.postgresql.org; Fri, 04 Sep 2026 19:30:52 +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 684JUcHR1584524; Fri, 4 Sep 2026 15:30:38 -0400 From: Tom Lane To: Noah Misch cc: jian he , Kirill Reshke , Peter Eisentraut , PostgreSQL Hackers Subject: Re: CREATE SCHEMA ... CREATE DOMAIN support In-reply-to: <20260904180712.cc.noahmisch@microsoft.com> References: <3819788.1775241322@sss.pgh.pa.us> <841583.1775414546@sss.pgh.pa.us> <944307.1775420103@sss.pgh.pa.us> <1199006.1775444695@sss.pgh.pa.us> <1838711.1775503188@sss.pgh.pa.us> <20260904002924.a7.noahmisch@microsoft.com> <1504966.1788483626@sss.pgh.pa.us> <20260904035154.0b.noahmisch@microsoft.com> <1566169.1788531712@sss.pgh.pa.us> <20260904180712.cc.noahmisch@microsoft.com> Comments: In-reply-to Noah Misch message dated "Fri, 04 Sep 2026 11:07:12 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1584522.1788550238.1@sss.pgh.pa.us> Date: Fri, 04 Sep 2026 15:30:38 -0400 Message-ID: <1584523.1788550238@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > On Fri, Sep 04, 2026 at 10:21:52AM -0400, Tom Lane wrote: >> What would you have us do differently? > I recommend reverting the v19 CREATE SCHEMA changes, unfortunately. The > thread started with what smelled like low-hanging fruit: let users write > "CREATE SCHEMA myschema CREATE DOMAIN mydomain" instead of "CREATE SCHEMA > myschema; CREATE DOMAIN myschema.mydomain". That led to a9c350d silently > changing the meaning of CREATE SCHEMA statements that v18 already accepts. > Since the benefit of supporting "CREATE SCHEMA myschema CREATE DOMAIN > mydomain" is so modest, it doesn't take much of a problem to outweigh that > benefit. Well, you have a point. There's pretty nearly nothing that's well-designed about CREATE SCHEMA subcommands: as you say, the syntax is shaky, and the namespace visible to subcommands is unclear, and the whole business of re-ordering subcommands is debatable, and even if all those things were fixed the benefit of the entire feature is marginal. So maybe we should just say that our legacy implementation is what it is and we will mark it deprecated rather than putting any effort into improving it. I'd like to see more than one vote in favor of that before I do it, though. regards, tom lane