agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert "Don't try to re-order the subcommands of CREATE SCHEMA".
Date: Fri, 11 Sep 2026 15:38:22 +0000
Message-ID: <E1x53KX-00000004S78-3mlP@gemulon.postgresql.org> (raw)

Revert "Don't try to re-order the subcommands of CREATE SCHEMA".

This reverts commit a9c350d9ee66745aadcf7c0c95a567752a762171.
While that intentionally changed our semantics for CREATE SCHEMA
subcommands, it's being argued that the functionality gain does
not justify potentially-subtle compatibility breakage.  The most
useful bit of functionality gain came from commit 404db8f9e
("Execute foreign key constraints in CREATE SCHEMA at the end"),
which we're keeping because it's required by SQL spec and doesn't
seem to create a compatibility hazard by itself.

This is not an exact revert, partly because we're keeping 404db8f9e,
and partly because I kept the API changes that allowed passing down
a ParseState (which allows providing an error cursor for many of the
errors thrown in CREATE SCHEMA).

Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20260904180712.cc.noahmisch@microsoft.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e0fdc3f54b417daeca957eb95b5eb04a418cc3bf

Modified Files
--------------
doc/src/sgml/ref/create_schema.sgml         |  23 +++---
src/backend/commands/schemacmds.c           |   7 +-
src/backend/parser/parse_utilcmd.c          | 116 +++++++++++++++++++---------
src/test/regress/expected/create_schema.out |   7 --
src/test/regress/expected/event_trigger.out |   2 +-
src/test/regress/expected/namespace.out     |   9 +--
src/test/regress/sql/create_schema.sql      |   5 --
src/test/regress/sql/namespace.sql          |  11 ++-
src/tools/pgindent/typedefs.list            |   1 +
9 files changed, 102 insertions(+), 79 deletions(-)



view thread (2+ messages)

Message-ID: <E1x53KX-00000004S78-3mlP@gemulon.postgresql.org>
Permalink:  ../E1x53KX-00000004S78-3mlP@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x53KX-00000004S78-3mlP@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Revert "Don't try to re-order the subcommands of CREATE SCHEMA".
  In-Reply-To: <E1x53KX-00000004S78-3mlP@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox