Re: Support for CREATE MODULE?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Support for CREATE MODULE?
Дата
Msg-id 2930661.1622646876@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Support for CREATE MODULE?  (Bruce Momjian <bruce@momjian.us>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Support for CREATE MODULE?
Следующее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Support for CREATE MODULE?