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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

REVOKE CREATE does not work on default tablespace



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group