Re: CREATE DATABASE foo OWNER bar

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: CREATE DATABASE foo OWNER bar
Дата
Msg-id 46237F90.3070501@dunslane.net
обсуждение исходный текст
Ответ на CREATE DATABASE foo OWNER bar  ("Larry Rosenman" <ler@lerctr.org>)
Ответы Re: CREATE DATABASE foo OWNER bar  (Larry Rosenman <ler@lerctr.org>)
Список pgsql-hackers
Larry Rosenman wrote:
> Greetings,
>     I think I found a bug, or at least a POLA violation.  At work, I created
> a user that is NOT a superuser, nor can that user create databases.  When I
> did a create database foo owner bar, all the schemas are set to be owned by
> the superuser that created the database, not the database owner.
>
>     Shouldn't everything that is in the DB be owned by the purported owner?
>
> This is on 8.2.3, btw.
>
> Thanks!
>
>
>   
umm ... objects are initially owned by their creator, no? Ownership of a 
db means you can grant privs over the db, but ownership doesn't cascade. 
If you want your user to own objects you should arrange for that user to 
create them, or run ALTER objtype foo OWNER TO username. The latter is 
what pg_dump does.

cheers

andrew




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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Build-Problem with pgc.c on OSX 10.4
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: CREATE DATABASE foo OWNER bar