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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-06-25 14:00:44 | Re: REVOKE CREATE does not work on default tablespace |
Previous Message | zhang.hm | 2007-06-25 02:58:26 | BUG #3411: how to add the granted of "Log on as a service" |