Re: Try adding type cast with tablespace

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Try adding type cast with tablespace
Дата
Msg-id 1128067.1695949956@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Try adding type cast with tablespace  (Kenichiro Tanaka <kenichirotanakapg@gmail.com>)
Список pgsql-hackers
Kenichiro Tanaka <kenichirotanakapg@gmail.com> writes:
> Therefore I think it is good to add regtablespace alias,but I’m also
> newbie pgsql-hackers.
> We need some senior hackers’s opinions.

Well ... for my two cents, I'm kind of down on this, mainly because
I don't understand where we'd stop.  I don't want to end up in a
scenario where every system catalog is expected to have a reg*
type to go with it, because that'd create a lot of make-work.

The original idea of the reg* types was to create an easy way to do
OID lookups in catalogs where the correct lookup rule is more
complicated than
    (SELECT oid FROM some_catalog WHERE name = 'foo')
So that motivates making reg* types for objects with
schema-qualified names, and even more so for functions and
types which have specialized syntax.  There was also some
consideration of which object types frequently need lookups.
IIRC, regrole got in partly because unprivileged users can't
select from pg_authid.

I don't really see that tablespaces meet the bar of any of these
past criteria: they don't have complex lookup rules nor are they
all that commonly used (IME anyway).  So if we accept this patch,
we're essentially saying that every catalog should have a reg*
type, and that's not a conclusion I want to reach.  We have 11
reg* types at the moment (only 9 if you discount the legacy
regproc and regoper ones), whereas there are about 30 catalogs
that have name columns.  Do we really want to open those
floodgates?

            regards, tom lane



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

Предыдущее
От: Kenichiro Tanaka
Дата:
Сообщение: Re: Try adding type cast with tablespace
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Allow deleting enumerated values from an existing enumerated data type