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 <[email protected]>
Discussion: https://postgr.es/m/[email protected]
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(-)

Reply via email to