On Mon, Jun 16, 2008 at 09:43:37PM -0400, Tom Lane wrote:
> Andrew Dunstan <[EMAIL PROTECTED]> writes:
> > David Fetter wrote:
> >> Maybe I'm missing something big, but I don't quite see what
> >> constitutes "proper" that doesn't involve the module's having at
> >> least one schema to itself.
> > ISTM that "uninstall foomodule" will be a whole lot nicer.
> Right.  We have all the mechanism we need in the form of the
> dependency stuff: you just make everything in the module auto-depend
> on the module object.  People who want to put their modules into
> private schemas can do it, but they won't be forced to.

It's not quite that simple.  Let's say you're *developing* a module.
I don't see any way to play with it in the separate module proposal,
where I *do* see a whole extra non-orthogonal feature where none is
needed.  No way to do optional submodules, either, and I'm sure there
are plenty of other nasty limitations.

Here's how what I'm proposing would work:

1.  Create a way for schemas themselves to depend on other schemas,
*not* on the stuff inside.  This would make dependency an extremely
simple problem, which is to say that DROP SCHEMA my_app CASCADE would
cause anything depending on it, all the way down to the leaves in the
DAG, to get dropped.  Without CASCADE, it would Do The Right
Thing™, i.e. throw an error.

2.  Create a way to readjust search_paths per-db and per-role, as
previously proposed.

3.  Create wrappers like (UN)INSTALL MODULE using the two tools above.
No, they would not necessarily appear in pg_dump.

Tom, please don't paint us into a corner.

David Fetter <[EMAIL PROTECTED]> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: [EMAIL PROTECTED]

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to