Re: Support for CREATE MODULE?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Jim Mlodgenski <jimmy76@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-02T15:14:36Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes: > If we go in this direction, I assume we would just disallow a schema > name matching the database name. That seems quite impossible to enforce. regression=# create database d1; CREATE DATABASE regression=# alter database d1 rename to d2; ALTER DATABASE The system had no way to know that d1 doesn't contain a schema named d2. And you can't fix that by restricting the ALTER to be done on the current database: regression=# \c d2 You are now connected to database "d2" as user "postgres". d2=# alter database d2 rename to d3; ERROR: current database cannot be renamed Between that and the point that this restriction would certainly break existing installations, this is a non-starter. regards, tom lane