Re: Dropping a schema

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Dropping a schema
Date: 2002-08-21 15:07:54
Message-ID: 1029942475.19817.1274.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2002-08-21 at 15:02, Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> > olly=# drop schema testing;
> > NOTICE: table testing.testa depends on schema testing
> > ERROR: Cannot drop schema testing because other objects depend on it
> > Use DROP ... CASCADE to drop the dependent objects too
>
> > This seems a little over-restrictive to me.
>
> It's per spec: SQL92 saith
...
> Also, it seems the safest behavior to me. "rmdir dir" won't remove a
> nonempty directory; isn't that a pretty close analogy?

Not really, seeing that you can't say "mkdir directory (containing these
files)". An implicit cascade *inside* the schema seems an appropriate
parallel to "CREATE SCHEMA ... (CREATE TABLE ...)". After all, we don't
have to say "DROP TABLE ... CASCADE" because the table has rows in it!

But if that's what the spec says...

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"For the Lord himself shall descend from heaven with a
shout, with the voice of the archangel, and with the
trump of God; and the dead in Christ shall rise first;
Then we which are alive and remain shall be caught
up together with them in the clouds, to meet the Lord
in the air; and so shall we ever be with the Lord."
I Thessalonians 4:16,17

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2002-08-21 15:11:24 Re: i'll promise, i'll be polite :-)
Previous Message Greg Copeland 2002-08-21 15:00:43 Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in