postgresql/src/backend
Tom Lane d516974840 Support more object types within CREATE SCHEMA.
Having rejected the principle that we should know how to re-order
the sub-commands of CREATE SCHEMA, there is not really anything
except a little coding to stop us from supporting more object types.
This patch adds support for creating functions (including procedures
and aggregates), operators, types (including domains), collations,
and text search objects.

SQL:2021 specifies that we should allow functions, procedures,
types, domains, and collations, so this moves us a great deal
closer to full SQL compatibility of CREATE SCHEMA.  What remains
missing from their list are casts, transforms, roles, and some
object types we don't support yet (e.g. CREATE CHARACTER SET).
Supporting casts or transforms would be problematic because
they don't have names at all, let alone schema-qualified names,
so it'd be quite a stretch to say that they belong to a schema.
Roles likewise are not schema-qualified, plus they are global
to a cluster, making it even less reasonable to consider them
as belonging to a schema.  So I don't see us trying to complete
the list.

User-defined aggregates and operators are outside the spec's ken,
as are text search objects, so adding them does not do anything for
spec compatibility.  But they go along with these other object types,
plus it takes no additional code to support them since they are
represented as DefineStmts like some variants of CREATE TYPE.
It would indeed take some effort to reject them.

Author: Kirill Reshke <reshkekirill@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CALdSSPh4jUSDsWu3K58hjO60wnTRR0DuO4CKRcwa8EVuOSfXxg@mail.gmail.com
2026-04-06 15:16:25 -04:00
..
access Allow autovacuum to use parallel vacuum workers. 2026-04-06 11:48:29 -07:00
archive Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
backup Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
bootstrap Introduce a registry of built-in shmem subsystems 2026-04-06 02:12:55 +03:00
catalog Allow index_create to suppress index_build progress reporting 2026-04-05 13:34:08 +02:00
commands Don't try to re-order the subcommands of CREATE SCHEMA. 2026-04-06 15:16:25 -04:00
executor instrumentation: Separate per-node logic from other uses 2026-04-05 19:04:24 -04:00
foreign Remove bits* typedefs. 2026-03-30 16:12:08 -05:00
jit jit: No backport::SectionMemoryManager for LLVM 22. 2026-04-03 14:55:11 +13:00
lib dshash: Make it possible to suppress out of memory errors 2026-03-19 11:51:17 -04:00
libpq oauth: Let validators provide failure DETAILs 2026-04-03 16:05:33 -07:00
main Update copyright for 2026 2026-01-01 13:24:10 -05:00
nodes Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
optimizer Fix volatile function evaluation in eager aggregation 2026-04-06 11:54:08 +09:00
parser Support more object types within CREATE SCHEMA. 2026-04-06 15:16:25 -04:00
partitioning Thread flags through begin-scan APIs 2026-03-30 12:27:24 -04:00
po Update copyright for 2026 2026-01-01 13:24:10 -05:00
port Use the new shmem allocation functions in a few core subsystems 2026-04-06 02:12:59 +03:00
postmaster Allow autovacuum to use parallel vacuum workers. 2026-04-06 11:48:29 -07:00
regex Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
replication Release postmaster working memory context in slotsync worker 2026-04-06 23:04:18 +09:00
rewrite Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
snowball Fix meson build of snowball code. 2026-01-05 16:51:36 -05:00
statistics Add support for extended statistics on virtual generated columns. 2026-04-01 17:02:24 +01:00
storage Rename cluster.c to repack.c (and corresponding .h) 2026-04-06 20:11:01 +02:00
tcop Don't try to re-order the subcommands of CREATE SCHEMA. 2026-04-06 15:16:25 -04:00
tsearch Require superuser to install a non-built-in selectivity estimator. 2026-02-09 10:07:31 -05:00
utils Allow autovacuum to use parallel vacuum workers. 2026-04-06 11:48:29 -07:00
.gitignore
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile ssl: Serverside SNI support for libpq 2026-03-18 12:37:11 +01:00
meson.build Add backtrace support for Windows using DbgHelp API 2026-02-24 17:34:56 +01:00
nls.mk Create a separate file listing backend types 2025-09-26 15:21:49 +02:00