public schema owner for newly created database - Mailing list pgsql-general

From Thomas Kellerer
Subject public schema owner for newly created database
Date
Msg-id li0k09$15f$1@ger.gmane.org
Whole thread Raw
Responses Re: public schema owner for newly created database  (Alberto Cabello Sánchez <alberto@unex.es>)
Re: public schema owner for newly created database  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
Hello all,

I usually create new databases with an explicit owner which is the "application user" that is used by the application
toconnect to the database. 

I recently noticed when I do the following:

postgres=# create user arthur identified by 'secret';
postgres=# create database guide owner = arthur;

Then when running \l I do see that the new database is owned by arthur.

However wenn I connect to the database and use \dn I see that the public schema is owned by "postgres" (the user that
wasused to create the database). 

Due to the default privileges on the public schema this isn't really a problem and I can always change the owner for
theschema anyway. 

But I would have expected the owner of the database to be the owner of any "object" that is created during database
initialization. 

Do I have a wrong assumption here?


Regards
Thomas



pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: Initial queries of day slow
Next
From: Alberto Cabello Sánchez
Date:
Subject: Re: public schema owner for newly created database