Re: Keep a user from creating tables ? - Mailing list pgsql-admin

From Gregory S. Williamson
Subject Re: Keep a user from creating tables ?
Date
Msg-id 71E37EF6B7DCC1499CEA0316A2568328010579AC@loki.wc.globexplorer.net
Whole thread Raw
In response to Keep a user from creating tables ?  ("Gregory S. Williamson" <gsw@globexplorer.com>)
Responses Re: Keep a user from creating tables ?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-admin
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:sszabo@megazone.bigpanda.com]
Sent:    Mon 5/17/2004 8:03 AM
To:    Gregory S. Williamson
Cc:    pgsql-admin@postgresql.org
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.




pgsql-admin by date:

Previous
From: "Jie Liang"
Date:
Subject: Log msg
Next
From: Stephan Szabo
Date:
Subject: Re: Keep a user from creating tables ?