Re: creating objects in pg_catalog

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: creating objects in pg_catalog
Дата
Msg-id CA+TgmoYCVMZGXB3Xcm0p=8szvGLtYUeEkS=0UariqFLtdLFn6g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: creating objects in pg_catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: creating objects in pg_catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Jun 6, 2012 at 4:39 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Right now, you can't directly create a relation (table, index,
>> composite type) in the pg_catalog schema, but you can create a
>> non-relation (function, domain, etc.) in the pg_catalog schema.
>
> Surely this is true only for superusers.  Superusers can do whatever
> they want anyway, no?

No.

rhaas=# create table pg_catalog.tom (a int);
ERROR:  permission denied to create "pg_catalog.tom"
DETAIL:  System catalog modifications are currently disallowed.
rhaas=# create table tom (a int);
CREATE TABLE
rhaas=# alter table tom set schema pg_catalog;
ALTER TABLE
rhaas=# create domain pg_catalog.lane as int;
CREATE DOMAIN

The offending error check is in heap_create(), and based on what
you're saying here it seems like we should just rip it out.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Avoiding adjacent checkpoint records
Следующее
От: Tom Lane
Дата:
Сообщение: Re: creating objects in pg_catalog