Tom Lane wrote:
> Although DROP TABLESPACE can detect tables existing in the target
> tablespace, it doesn't have any way to detect schemas that reference
> that tablespace as their default tablespace. Thus you can get
> implementation-level failures like this one:
>
> $ mkdir /tmp/junk
>
> regression=# create tablespace junk location '/tmp/junk';
> CREATE TABLESPACE
> regression=# create schema junk tablespace junk;
> CREATE SCHEMA
> regression=# drop tablespace junk;
> DROP TABLESPACE
Why this doesn't fail? The junk schema depend on tablespace junk,
is there no dependencies between these two objects.
G.