Re: Support for CREATE MODULE?

Поиск
Список
Период
Сортировка
От Jim Mlodgenski
Тема Re: Support for CREATE MODULE?
Дата
Msg-id CAB_5SReTY7-FS_s8x7TwpgjbX4DVcYjLE=_yWC+UDENu4Cs7WQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Support for CREATE MODULE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Support for CREATE MODULE?  (Bruce Momjian <bruce@momjian.us>)
Re: Support for CREATE MODULE?  (Joe Conway <mail@joeconway.com>)
Re: Support for CREATE MODULE?  ("Joel Jacobson" <joel@compiler.org>)
Re: Support for CREATE MODULE?  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On Wed, Jun 2, 2021 at 9:58 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> In the first place, what do you think the primary key of pg_namespace is now?

In the patch the unique constraint is (nspname, nspnamespace) which is
certainly awkward. I initially went down the pg_module route to avoid
adding another catalog, but in retrospect, that may be a cleaner way.


> It's already quite hard to tell which part
> of a multiply.qualified.name is which, given that SQL says that you can
> optionally put a "catalog" (database) name in front of the others.
> I really doubt there is a way to shoehorn sub-schemas in there without
> creating terrible ambiguities.  Is "a.b.c" a reference to object c in
> schema b in database a, or is it a reference to object c in sub-schema b
> in schema a?

That was the area I had the most difficult part to reason about. I tried to make
some simplifying assumptions by checking if "a" was the current database.
Since we don't support cross database access, if it was not, I assumed "a"
was a schema. I not sure if that would be valid, but it did scope things
to a more manageable problem.

> I wonder whether it'd be better to consider modules as a kind of
> extension, or at least things with the same sort of ownership relations
> as extensions have.

That would solve the problem of associating objects which is the larger
problem for users today. The objects can all live in their respective
schemas with the module tying them all together.



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

Предыдущее
От: Greg Sabino Mullane
Дата:
Сообщение: Re: Speed up pg_checksums in cases where checksum already set
Следующее
От: Tom Lane
Дата:
Сообщение: Re: tab-complete for CREATE TYPE ... SUBSCRIPT