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 "Support more object types within CREATE SCHEMA".
Date: Fri, 11 Sep 2026 15:38:22 +0000
Message-ID: <E1x53KX-00000004S71-3UUb@gemulon.postgresql.org> (raw)

Revert "Support more object types within CREATE SCHEMA".

This reverts commit d516974840f4059d331ae6057ede3e4edd3c6747,
along with parts of commit 049b742daad0965be4a846035408ae27ce1f9e14
("psql: Tighten heuristics for BEGIN/END within CREATE SCHEMA").

While there's nothing particularly wrong with d51697484 in itself,
it depends on a9c350d9e ("Don't try to re-order the subcommands of
CREATE SCHEMA"), and concerns have been raised that the compatibility
impact of that outweighs the benefit of allowing more object types
within CREATE SCHEMA.

It's not possible to revert 049b742da verbatim, because the
CVE-2026-6464 patches 3045a25ba ("Teach psql to skip in-line COPY
... FROM STDIN data after a failure") and cf754f741 ("Save/restore
more lexer state when skipping text due to \if") depend on
infrastructure it added.  Instead, rip out just the bits specifically
needed to parse CREATE FUNCTION within CREATE SCHEMA.  This results in
lexer code that matches v18-and-earlier as modified by CVE-2026-6464.

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

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/ref/create_schema.sgml                |  25 +---
src/backend/parser/gram.y                          |   3 -
src/backend/parser/parse_utilcmd.c                 |  88 ------------
src/bin/psql/psqlscanslash.l                       |   8 --
src/bin/psql/tab-complete.in.c                     |  22 ++-
src/fe_utils/psqlscan.l                            |  61 ++-------
src/include/fe_utils/psqlscan_int.h                |   6 -
.../test_ddl_deparse/expected/create_schema.out    |  38 +-----
.../modules/test_ddl_deparse/sql/create_schema.sql |  18 +--
src/test/regress/expected/create_schema.out        | 147 +--------------------
src/test/regress/sql/create_schema.sql             |  81 +-----------
11 files changed, 31 insertions(+), 466 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1x53KX-00000004S71-3UUb@gemulon.postgresql.org>
Permalink:  ../E1x53KX-00000004S71-3UUb@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x53KX-00000004S71-3UUb@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 "Support more object types within CREATE SCHEMA".
  In-Reply-To: <E1x53KX-00000004S71-3UUb@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