Re: Cannot create a type in pg_catalog

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Cannot create a type in pg_catalog
Дата
Msg-id 46CD971F.6080604@postgresql.org
обсуждение исходный текст
Ответ на Re: Cannot create a type in pg_catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Cannot create a type in pg_catalog
Список pgsql-bugs
Tom Lane wrote:
> Dave Page <dpage@postgresql.org> writes:
>> Should this work, or at least give a more appropriate error message?
>> demo=# CREATE TYPE pg_catalog.mytype AS (data text);
>> ERROR:  permission denied to create "pg_catalog.mytype"
>> DETAIL:  System catalog modifications are currently disallowed.
>
> Seems like a perfectly appropriate error message to me: it's disallowed.

I see three issues:

- it's only partially disallowed - why can I create a function, but not
a type? Shouldn't both be either allowed or disallowed?


- The description in the docs of pg_authid.rolcatupdate reads:

Role may update system catalogs directly. (Even a superuser may not do
this unless this column is true)

However, even with it set to true, I cannot do so. Of course, this
depends on whether you define 'system catalogs' as the tables in
pg_catalog, or the pg_catalog schema itself. Either way, something's a
little wonky.


- "are currently disallowed" implies that sometimes it is allowed. How
does one control that, or is it implying something that is not the case,
or only the case in unusual circumstances such as a standalone backend?


Note that I'm making no comment on whether or not I should be able to do
 what I'm suggesting (thought preventing it will break adminpack) - just
that we have some inconsistencies at the very least.

Regards, Dave

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Cannot create a type in pg_catalog
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Cannot create a type in pg_catalog