Re: REVOKE CREATE does not work on default tablespace

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: REVOKE CREATE does not work on default tablespace
Date: 2007-06-25 16:16:17
Message-ID: 112.1182788177@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> Tom Lane wrote:
>> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>>> It seems that we not able to revoke create privilege on default tablespace.
>>
>> This is intentional.

> I don't understand why.

It's presumed that the right to create tables within a database entails
the right to create them someplace; hence no permissions check is made
on the database's default tablespace. Without that, not only does plain
CREATE TABLE fail (including CREATE TEMP TABLE), but any query complex
enough to require a temporary file would fail as well. So you'd pretty
much have to grant rights on the tablespace to every user of the database
anyway.

By not making that check, we make it feasible to only grant rights on
tablespaces to DB owners/creators, plus any individual users who should
have the right to determine where their tables go.

There is a permission check when a tablespace is first named as the
default space for a new database, but not afterwards.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zdenek Kotala 2007-06-25 16:52:09 Re: REVOKE CREATE does not work on default tablespace
Previous Message Zdenek Kotala 2007-06-25 14:26:29 Re: REVOKE CREATE does not work on default tablespace