Skip site navigation (1) Skip section navigation (2)

Re: Cannot create a type in pg_catalog

From: Dave Page <dpage(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Cannot create a type in pg_catalog
Date: 2007-08-23 14:18:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tom Lane wrote:
> Dave Page <dpage(at)postgresql(dot)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

In response to


pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2007-08-23 14:34:49
Subject: Re: Cannot create a type in pg_catalog
Previous:From: Tom LaneDate: 2007-08-23 14:06:36
Subject: Re: Cannot create a type in pg_catalog

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group