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 1x4MdF-0075zF-3B for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 18:02:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4MdD-00H2sm-21 for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 18:02:47 +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 1x4MdD-00H2sd-0z for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 18:02:47 +0000 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x4MdB-00000004ohG-0aBC for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 18:02:46 +0000 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-6bd209cf210so1126391eaf.3 for ; Wed, 09 Sep 2026 11:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1788976964; x=1789581764; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:content-type :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=6b88P94+x6mkeZAXCy0AhWjUYhvbZ1KunoelXm6nDxA=; b=bH1koKG9RdcBsNAqi4Q/4giQQ9rzfMbpcJy/k4LnSoT2npuyIOuI75mjX4RbBxicZB xLcKF6cDVCCT9r3o/ktIoAo1pyZi5fmpV3uSYnCRDjZBzLp8cz9OOnmxqzVsso5dK/oa K2snYH4C4ouyn4RlJIsS1XBsUTjs5rpKmpt88= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788976964; x=1789581764; h=user-agent:in-reply-to:content-disposition:content-type :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6b88P94+x6mkeZAXCy0AhWjUYhvbZ1KunoelXm6nDxA=; b=oiQjZ35wr6j/axuwGXfO8aekyY3Qe5BDqxszHaeTrzOew9ZIL1ptCE/xIgCgfkcvhH 5BJRMyUHo90ugsW+Evqc4Jt4ysjQHLfYKk1NAiqm1iveIBw+auU8WM0nosdB3lXdfNAj J4WbURQH9TTfZK+Fxbm0YF4weMaRXQLZS7wP+PBbUgOauiS1r1a4LxHI0nMFBNV0r7rI evz1VtJ4/EcoMrEUfZKliqUL4R04A2fW9bDrqJnbIatWEOMFHI9WHwIbBiGqcrX0wNTc vxRA7deJvE2J5xVJFDs+Q3GUw7gpj+kZWxngc00ix1ys6BwS1XvWIAP0uhwcUdnvVTB+ WGHQ== X-Forwarded-Encrypted: i=1; AKwUvBxOg9Uy0TNC+19MHJOEWdMZ/QmALq9MhQ2nXFAI8r5c/i6irsFpqRo4l0z3md9c1Bis6w5X4lRYNlFBFZJI@lists.postgresql.org X-Gm-Message-State: AFuF++kyEFB2wkWrH8lju83TKdU1Pxfi2uWVUjIg3QcZv04Eg52nT9vl qL7a0v/OWa0suacdCs2Ymy4aMK6bM6yBIUYp9DSlnJclVnlEcXKR5kAXFBmwjWGt+Q== X-Gm-Gg: AYBFou31HuiFO+KzkDw8vhYZDOviOOsKG3+NqsgkRYr0TkBLq5LNECmKvqgJ0CxShwa f8JH8H8ajJPaLX0dMFF9NP8TwNfhiiId6PY5YlNZdHgZa4+xEMgbuMZJarImovAcJRH/JMSZPHb Uvq3oIXKuWgDl0tGMT2SBUj/2lSszF6tn+GyKybBV9/XnbSsova2oYvS3+ee6mPqrtgn6x1QhdK GZat6DD/FRONZv0qo/VwZrdzGnB7u8XmYjxPPPW46kNd66B49GrXeq3FktP3El5P6qlOY9qhaMT SILw8/XVkxjpkMqiLwzwlPTVWfItIaDzQbBdQxO2Azj0g53ByVF5AucoTEnI2bBaY6ffvbkOEum f/fuzuOx7keTw7tppcDjN5bpjvjUDyeWjPHhHLYXDpS7YiHqWeKM/TgbUI/n7I/utfuWd8kuVR5 KrD6z8or7+5326ktpTB/uF11iY0wXurnljNcik2ax3iBuDpFtvx3/kxahZwbWRW2l5mE8pzWuoy vcklBb6N9G2VqmJhFXmjMKfMyMlOZE= X-Received: by 2002:a4a:e847:0:b0:6b7:46e9:9700 with SMTP id 006d021491bc7-6b746e9a360mr19673243eaf.48.1788976963648; Wed, 09 Sep 2026 11:02:43 -0700 (PDT) Received: from microsoft.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-143240d86c3sm41179657c88.0.2026.09.09.11.02.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2026 11:02:41 -0700 (PDT) Date: Wed, 9 Sep 2026 11:02:38 -0700 From: Noah Misch To: Tom Lane Cc: Nathan Bossart , Heikki Linnakangas , jian he , Kirill Reshke , Peter Eisentraut , PostgreSQL Hackers Subject: Re: CREATE SCHEMA ... CREATE DOMAIN support Message-ID: <20260909180238.b9.noahmisch@microsoft.com> References: <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> <627673.1788972291@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <627673.1788972291@sss.pgh.pa.us> User-Agent: Mutt/2.3.0 (2026-01-25) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Sep 09, 2026 at 12:44:51PM -0400, Tom Lane wrote: > 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 don't have concerns specific to that change. In general, since the changes were part of a composed series, I'd ascribe non-negligible risk to keeping just part of the series. Maybe leave it in master but revert from v19? On the other hand, the change is contained to a low-risk topic. I don't have a strong preference between those choices. > 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. What's a command that notices the difference? Something like a sql-standard function body where the user backslashed the semicolons even though it wasn't necessary? I agree it's conceptually right to keep that bit. Resetting detection makes sense at an unescaped semicolon that ends the query buffer, but that doesn't extend to an escaped semicolon. I'm somewhat struggling to map out the implications for existing scripts, but that's fair for a major release.