Keep a user from creating tables ?

From: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Keep a user from creating tables ?
Date: 2004-05-17 04:02:13
Message-ID: 71E37EF6B7DCC1499CEA0316A2568328010579A6@loki.wc.globexplorer.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


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

I tried (as postgres user):
REVOKE ALL ON DATABASE test FROM testuser;

testuser can still connect and can still select from the tables I want them to see, but as user "testuser":

test=> CREATE TABLE foo(man INT,choo VARCHAR(2));
CREATE TABLE
test=> drop table foo;
DROP TABLE
test=> create temporary table foo (man INT,choo VARCHAR(2));
ERROR: permission denied to create temporary tables in database "test"
test=>

============

I'm sure this is obvious but I'm not seeing it ... not just temporary, but all tables should be disallowed.

TIA,

Greg Williamson
DBA
GlobeXplorer LLC

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Saket Bagade 2004-05-17 10:42:12 Data/Index consistency checking in PostgreSQL
Previous Message Jared Evans 2004-05-17 01:54:55 Re: How to determine if ODBC was compiled in?