Re: `DROP DATABASE RESTRICT` ?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: `DROP DATABASE RESTRICT` ?
Дата
Msg-id CAKFQuwYzpDpkLdhC28FUbt1K4MPF=qr+CQs4EUPbZNA=TTb72w@mail.gmail.com
обсуждение исходный текст
Ответ на `DROP DATABASE RESTRICT` ?  (Brennan Vincent <brennan@materialize.io>)
Список pgsql-general
On Wed, Mar 4, 2020 at 6:17 PM Brennan Vincent <brennan@materialize.io> wrote:
Hello all,

I was wondering if there is some reason why Postgres doesn't support a
`RESTRICT` option that would refuse to drop a database if it contains
any schemas or objects, similarly to the semantics of `DROP SCHEMA
[...] RESTRICT`.

Is there a fundamental reason not to support it, or is it just that
nobody has implemented it yet?

Fundamentally you are not connected to the database you are dropping and so don't have access to the knowledge of whether its populated or not.  It also likely has at least an empty public schema...

David J.

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

Предыдущее
От: "Ravi Krishna"
Дата:
Сообщение: Re: Determining the type of an obkect in plperl
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Performance Problem