Schema authorization after create database. - Mailing list pgsql-admin

From Ian FREISLICH
Subject Schema authorization after create database.
Date
Msg-id E1E39Rt-0004F3-5l@hetzner.co.za
Whole thread Raw
Responses Re: Schema authorization after create database.  (Tsirkin Evgeny <tsurkin@mail.jct.ac.il>)
Re: Schema authorization after create database.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Hi

I ran into this little astonishment yesterday on 7.4.8.  When I
create a database connected as the super user using:

CREATE DATABASE foo OWNER = foo;

The database is indeed owned by user foo, but the automatically
created public schema is is owned by the database super user.  Should
this schema not be created as owned by the database owner specified
in the CREATE DATABASE command?

Our work around is to drop the public schema and recreate it after
reconnecting as the database owner, but that seems like work I
shouldn't have to do.

Is this a problem or am I expecting something that I shouldn't?

Ian

--
Ian Freislich

pgsql-admin by date:

Previous
From: "Gregory S. Williamson"
Date:
Subject: restoring an old database to a new instance -- possible ?
Next
From: Tsirkin Evgeny
Date:
Subject: Re: Schema authorization after create database.