Обсуждение: Grants on creating tables..

Поиск
Список
Период
Сортировка

Grants on creating tables..

От
Andrzej Kwiatkowski
Дата:
I've read that in postgres v 7.3 and above is possible to set
permissions for creating tables in given database...

I've tried in many various ways, byt always given user can create
tables in database.

Have you got any idea ?
Maybe some example ??

Thanks in advance
Andrzej Kwiatkowski

Re: Grants on creating tables..

От
Stephan Szabo
Дата:
On Mon, 13 Jan 2003, Andrzej Kwiatkowski wrote:

> I've read that in postgres v 7.3 and above is possible to set
> permissions for creating tables in given database...
>
> I've tried in many various ways, byt always given user can create
> tables in database.

If you remove the create permission from all of the schemas for the user
they shouldn't be able to create non-temporary tables. On my empty 7.4
devel database, after doing

REVOKE CREATE on SCHEMA public FROM public;

a random non-superuser account on the database no longer can create tables
(apart from temporary ones).


Re: Grants on creating tables..

От
Bruno Wolff III
Дата:
On Mon, Jan 13, 2003 at 14:59:58 -0800,
  Stephan Szabo <sszabo@megazone23.bigpanda.com> wrote:
>
> On Mon, 13 Jan 2003, Andrzej Kwiatkowski wrote:
>
> > I've read that in postgres v 7.3 and above is possible to set
> > permissions for creating tables in given database...
> >
> > I've tried in many various ways, byt always given user can create
> > tables in database.
>
> If you remove the create permission from all of the schemas for the user
> they shouldn't be able to create non-temporary tables. On my empty 7.4
> devel database, after doing
>
> REVOKE CREATE on SCHEMA public FROM public;
>
> a random non-superuser account on the database no longer can create tables
> (apart from temporary ones).

You also probably want to revoke create on the database so that the person
cannot create schemas in which they could create tables.