quota on database

Поиск
Список
Период
Сортировка
От Marek Florianczyk
Тема quota on database
Дата
Msg-id 1051544035.5274.117.camel@franki-laptop.tpi.pl
обсуждение исходный текст
Список pgsql-admin
Hi,

We wanted to give database for our customers, bu there was a problem how
to limit database size. I made some perl script that count size of the
database directory and if exceeded:
revoke all privileges on [tablename] from [user]
grant select delete on [tablename] from [user]

But user can create new table and insert new data.
I was searching pgsql-admin archives about how to deny this, but with no
luck.
In postgres 7.3.2 ( maybe earlier ) there are schema's
Even if user is a database owner, the public schema is uid 1 (postgres )
So, in some database as postgres I do:
revoke create on chema public from [user]
Now he can't create new tables
Next:
revoke create on database [databasename] from [user]
Now he can't create new schema

So, it looks like I can control size of the database. Do you think that
this is a good idea? Maybe someone know about some trick that now allow
users to somehow insert new data?

Marek


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

Предыдущее
От: Gémes Géza
Дата:
Сообщение: Users fo ONE database
Следующее
От: "dlangschied"
Дата:
Сообщение: Logical Fields in postgres.