Thread: NewB question wrt Create Database

NewB question wrt Create Database

From
Josh
Date:
Howdy All,

I have a question about the behavior of PGAdmin (or perhaps this is PG) in 
creating databases.

If I create a DB while logged in as postgres, and indicate the database 
owner is another login role, then PG creates the database with that login 
role being the owner but everything within the db is owned by Postgres. 
So, for example, I can't go start creating tables and such as the login 
role because that role does not own the public schema.

Why does it behave in this way?

Thanks,
-J



Re: NewB question wrt Create Database

From
Guillaume Lelarge
Date:
Hi,

Josh wrote:
> I have a question about the behavior of PGAdmin (or perhaps this is PG) 
> in creating databases.
> 
> If I create a DB while logged in as postgres, and indicate the database 
> owner is another login role, then PG creates the database with that 
> login role being the owner but everything within the db is owned by 
> Postgres. So, for example, I can't go start creating tables and such as 
> the login role because that role does not own the public schema.
> 
> Why does it behave in this way?
> 

It doesn't behave like this for me. Which PostgreSQL release do you use 
? did you try the same thing with psql or phppgadmin ?


-- 
Guillaume. http://www.postgresqlfr.org http://dalibo.com