Stephan,

Thanks for the info, but alas, no success.

I have:
              List of database users
 User name | User ID |         Attributes
-----------+---------+----------------------------
 testuser  |     100 |
 postgres  |       1 | superuser, create database


And as postgres I ran:
REVOKE ALL ON SCHEMA public FROM testuser;

Then I connect:
psql -d testdb -U testuser

(I should not even be able to connect ?)

And I run:
CREATE TABLE foo (man INT, choo(VARCHAR(20));

And it works ...

Am I misundertanding something, or is it simply not possible to prevent users from 
creating tables ?

In Informix this quite easy:
  REVOKE RESOURCE FROM testuser;

I am puzzled at postgres' documentation, and perhaps at its underlying logic.

Any help would be appreciated -- this is sort of important.

Thanks!

Greg W.



-----Original Message-----
From:   Stephan Szabo [mailto:[EMAIL PROTECTED]
Sent:   Mon 5/17/2004 8:03 AM
To:     Gregory S. Williamson
Cc:     [EMAIL PROTECTED]
Subject:        Re: [ADMIN] Keep a user from creating tables ?
On Sun, 16 May 2004, Gregory S. Williamson wrote:

> In postgres 7.4, is there any way to stop a user from creating tables in a given 
> database ?

Make the user not have rights to create objects in any schemas. Most
likely you'd only need to change the public schema, but if you've granted
create rights for other schemas you'll need to revoke those as well.




---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to