Re: CREATE TABLE in PUBLIC schema

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CREATE TABLE in PUBLIC schema
Дата
Msg-id 23647.1037209642@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CREATE TABLE in PUBLIC schema  (Heni Lolov <hal_bg@yahoo.com>)
Список pgsql-admin
Heni Lolov <hal_bg@yahoo.com> writes:
> ive tried :
> revoke all ON schema public from hal;
> but does not work. Why?

You'd need to revoke the permissions from PUBLIC; they were never granted
specifically to hal, thus the above revoke is a no-op.

Don't forget to revoke CREATE at the database level, too, else a user
can just create his own schema.  Perhaps also revoke TEMP, depending on
whether you'd like to forbid temporary tables as well.

In short, something like

revoke create on schema public from public;
revoke create,temp on database mydb from public;

should give you a database in which users can't create anything.

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Warren Massengill"
Дата:
Сообщение: 7.3b download problem
Следующее
От: Hugh Esco
Дата:
Сообщение: Troubles at Startup