Re: schema support, was Package support for Postgres

Поиск
Список
Период
Сортировка
От Bill Studenmund
Тема Re: schema support, was Package support for Postgres
Дата
Msg-id Pine.NEB.4.33.0110141108370.20774-100000@vespasia.home-net.internetconnect.net
обсуждение исходный текст
Список pgsql-hackers
On Mon, 15 Oct 2001, Tom Lane wrote:

> Bill Studenmund <wrstuden@netbsd.org> writes:
> > For the most part, I think packages and schemas are orthogonal. I'm taking
> > a cue from Oracle here. Oracle considers packages to be a schema-specific
> > object.
>
> Nonetheless, it's not clear to me that we need two independent concepts.
> Given a name search path that can go through multiple schemas, it seems
> to me that you could get all the benefits of a package from a schema.

About the best response to this I can come up with is that in its present
implimentation, types and operators are not scoped as package-specific. If
you declare a type in a package, that type is usable anywhere; you don't
have to say package.type. If we did packages via schemas, as I understand
it, you would (and should).

We both agree that types and the functions that operate on them should be
schema-specific. Thus operators should be schema-specific. If we did
packages via schemas, I don't see how we would get at operators in
packages. If you create a new integer type, would you really want to have
to type "3 packname.< table.attr" to do a comparison?

So I guess that's the reason; this package implimentation creates types
and operators in the same namespace as built-in types and operators. As I
understand schemas, user types (and thus operators) should exist in a
schema-specific space.

I can see reasons for both, thus I think there is a place for two
independent concepts.

Take care,

Bill



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Snaptshot appears fine to me ...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Snaptshot appears fine to me ...