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 1x4LQ2-0075De-2g for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 16:45:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4LQ1-00GWd6-1N for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 16:45:05 +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 1x4LQ1-00GWco-0Q for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 16:45:05 +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 1x4LPy-00000004o1q-2WF5 for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 16:45:04 +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 689Gippq627674; Wed, 9 Sep 2026 12:44:51 -0400 From: Tom Lane To: Nathan Bossart cc: Heikki Linnakangas , Noah Misch , jian he , Kirill Reshke , Peter Eisentraut , PostgreSQL Hackers Subject: Re: CREATE SCHEMA ... CREATE DOMAIN support In-reply-to: References: <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> <1584523.1788550238@sss.pgh.pa.us> <57046562-8fe6-4663-b4d7-724d195f38f7@iki.fi> Comments: In-reply-to Nathan Bossart message dated "Wed, 09 Sep 2026 11:17:13 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <627672.1788972291.1@sss.pgh.pa.us> Date: Wed, 09 Sep 2026 12:44:51 -0400 Message-ID: <627673.1788972291@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Wed, Sep 09, 2026 at 06:53:58PM +0300, Heikki Linnakangas wrote: >> Reverting seems like the safest thing to do. This is a really niche thing, >> but whatever behavior we pick, we'll be stuck with it for a long time. If >> we're not 100% certain about the new behavior, better to take a step back >> and discuss and design it with more time. > +1 After looking at the git history a bit, the relevant commits are Branch: master Release: REL_19_BR [049b742da] 2026-06-23 14:12:03 -0400 psql: Tighten heuristics for BEGIN/END within CREATE SCHEMA. Branch: master Release: REL_19_BR [d51697484] 2026-04-06 15:16:25 -0400 Support more object types within CREATE SCHEMA. Branch: master Release: REL_19_BR [404db8f9e] 2026-04-06 15:16:25 -0400 Execute foreign key constraints in CREATE SCHEMA at the end. Branch: master Release: REL_19_BR [a9c350d9e] 2026-04-06 15:16:25 -0400 Don't try to re-order the subcommands of CREATE SCHEMA. It looks like it might be possible to revert a9c350d9e and d51697484 while keeping 404db8f9e, which would preserve a feature clearly required by the SQL standard (F311-01, "Support for circular references in that s in two different s may reference columns in the other table") while not breaking compatibility with our pre-19 behavior. Any opinions about whether that's a good thing to try to do, rather than a wholesale revert? I'm also inclined to keep this bit of 049b742da: This patch also fixes what seems to me (tgl) a small bug: \; would reset BEGIN/END detection even when inside parens or BEGIN. That's unlike what a plain semicolon would do, and no such effect is suggested by the documentation. regards, tom lane