Re: Keep a user from creating tables ?

Поиск
Список
Период
Сортировка
От Gregory S. Williamson
Тема Re: Keep a user from creating tables ?
Дата
Msg-id 71E37EF6B7DCC1499CEA0316A2568328010579AC@loki.wc.globexplorer.net
обсуждение исходный текст
Ответ на Keep a user from creating tables ?  ("Gregory S. Williamson" <gsw@globexplorer.com>)
Ответы Re: Keep a user from creating tables ?
Список 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 по дате отправления:

Предыдущее
От: "Jie Liang"
Дата:
Сообщение: Log msg
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Keep a user from creating tables ?