On Mon, 21 Jan 2002, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Remember that a schema is a named representation of ownership, so anything
> > that can be owned must be in a schema. (Unless you want to invent a
> > parallel universe for a different kind of ownership, which would be
> > incredibly confusing.)
>
> I don't buy that premise. It's true that SQL92 equates ownership of a
> schema with ownership of the objects therein, but AFAICS we have no hope
> of being forward-compatible with existing database setups (wherein there
> can be multiple tables of different ownership all in a single namespace)
> if we don't allow varying ownership within a schema. I think we can
> arrange things so that we are upward compatible with both SQL92 and
> the old way. Haven't worked out details yet though.
Yes we most certianly can! :-)
One of the things schemas have to support is essentially a PATH specifier.
So all we need to do is have all of the schemas created in a new DB have
path specifiers pulling in all of the other schemas. Thus we can make a
schema-savy system act as if it has only one namespace.
Back when Zembu was paying me to work on this, I envisioned a script or
tool you'd feed a DB dump, and it would do the schema fixup, including
adding PATH directives to all schemas, so they all see everything.
Since you have to pg_dump when updating, all this adds is running one tool
during an upgrade. And then existing apps would work. :-)
Take care,
Bill