Search Postgresql Archives

Re: `DROP DATABASE RESTRICT` ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 4, 2020 at 6:17 PM Brennan Vincent <brennan@xxxxxxxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux