Re: Uninstall script errors - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Uninstall script errors
Date
Msg-id 5122.1141328953@sss.pgh.pa.us
Whole thread Raw
In response to Re: Uninstall script errors  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Uninstall script errors
List pgsql-hackers
Michael Fuhr <mike@fuhr.org> writes:
> Would it make sense for DROP TYPE to have some kind of limited
> cascade so you could drop a type and its I/O functions at the same
> time, but still get an error if other objects depend on the type?

Seems pretty ugly.  Maybe the thing to do is have a command that somehow
reverts a type to the "shell" state, whereupon the deletion sequence can
be the exact logical inverse of the creation sequence:
* drop other dependencies* shell-ify type* drop I/O functions* drop shell type

What's not very clear to me though is how you determine whether it's
safe to shell-ify the type.  I don't think you want to allow that as
long as any columns of the type remain, for instance.  If this requires
verifying that it has no remaining dependencies except the I/O
functions, then it seems no different really from a "limited cascade".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: PostgreSQL Anniversary Summit, Call for Contributions
Next
From: Neil Conway
Date:
Subject: Re: PostgreSQL Anniversary Summit, Call for Contributions