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

REVOKE CREATE does not work on default tablespace

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: pgsql-bugs(at)postgresql(dot)org
Subject: REVOKE CREATE does not work on default tablespace
Date: 2007-06-25 13:54:26
Message-ID: 467FC912.1090509@sun.com (view raw or flat)
Thread:
Lists: pgsql-bugs
I try to revoke create privileges (PG8.2.4) on the default tablespace and I 
found following strange behavior:


----------------
As superuser:

revoke create on TABLESPACE pg_default from u_test1;

As u_test1:

ns_test=> create table test_06 (id int) tablespace pg_default;
ERROR:  permission denied for tablespace pg_default
ns_test=> create table test_06 (id int);
CREATE TABLE

ns_test=> select relname, reltablespace from pg_class where relname like 
'%test_06%';

    relname    | reltablespace
--------------+---------------
  test_06      |             0

ns_test=# select oid,spcname from pg_tablespace;
   oid  |  spcname
-------+------------
   1664 | pg_global
  24585 | ts_test
   1663 | pg_default

------------------

It seems that we not able to revoke create privilege on default tablespace.

I think the main problem is that pg_default has OID=1663, but all objects in 
this tablespace have reltablespace=0. Is there reason why 0 is used instead of 
correct oid?


		Zdenek

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-06-25 14:00:44
Subject: Re: REVOKE CREATE does not work on default tablespace
Previous:From: zhang.hmDate: 2007-06-25 02:58:26
Subject: BUG #3411: how to add the granted of "Log on as a service"

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