Re: CREATE DATABASE foo OWNER bar

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: CREATE DATABASE foo OWNER bar
Дата
Msg-id 20070416145538.GH5658@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: CREATE DATABASE foo OWNER bar  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan wrote:
> Alvaro Herrera wrote:
> >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?
> >>    
> >
> >Right.  This is on TODO:
> >
> >%Set proper permissions on non-system schemas during db creation
> >
> >Currently all schemas are owned by the super-user because they are copied 
> >from
> >the template1 database. 
> >
> >
> >I note it is marked with a %, but it's clearly not easy at all.
> 
> If it's only schemas I don't see why it would be very hard. If you want 
> that to cascade to all non-system objects, as Larry suggests, it would 
> possibly be harder.
> 
> In the most common case it will only be the public schema and that will 
> be empty.

There was already a patch (by Fabien Coelho IIRC) but it was never
applied.

... searches for a while ...

Ah, yes, here it is:
http://archives.postgresql.org/pgsql-patches/2004-06/msg00084.php

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: Build-Problem with pgc.c on OSX 10.4
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Adjusting index special storage for pg_filedump's convenience