Re: creating objects in pg_catalog

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: creating objects in pg_catalog
Date: 2012-06-14 14:02:20
Message-ID: CA+TgmobyuCaReE3FmjkZFH0xO9eQZZAHTM_Guqd5bGwUnLmsjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 7, 2012 at 8:44 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Jun 6, 2012 at 5:21 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> rhaas=# create table pg_catalog.tom (a int);
>>> ERROR:  permission denied to create "pg_catalog.tom"
>>
>>> 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.
>>
>> Hmm.  Yeah, it seems like the regular permissions tests on the schemas
>> in question should be enough to keep Joe User from making tables there,
>> and I do not see a reason why the backend would care if there are
>> non-catalog tables laying about in pg_catalog.
>>
>> Checking the commit history, it seems this was originally a test to
>> prevent people from creating tables named "pg_xxx":
>>
>> http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9999f5a10e722c052006886b678995695001958a#patch3
>>
>> which may or may not have been critical once upon a time, but surely is
>> not any more.
>>
>> So no objection to removing that particular test.
>
> Patch attached.  Barring objections, I'll apply this to 9.3 once we branch.

Hearing no objections, done.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-06-14 14:04:22 Re: [PATCH 02/16] Add zeroRecPtr as a shortcut for initializing a local variable to {0, 0}
Previous Message Andres Freund 2012-06-14 13:57:53 Re: [PATCH 02/16] Add zeroRecPtr as a shortcut for initializing a local variable to {0, 0}