mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
This reverts commitd516974840, along with parts of commit049b742daa("psql: Tighten heuristics for BEGIN/END within CREATE SCHEMA"). While there's nothing particularly wrong withd51697484in itself, it depends ona9c350d9e("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 revert049b742daverbatim, because the CVE-2026-6464 patches3045a25ba("Teach psql to skip in-line COPY ... FROM STDIN data after a failure") andcf754f741("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