The following bug has been logged on the website:
Bug reference: 13783
Logged by: Alex Hayward
Email address: xelah-postgresql@xelah.com
PostgreSQL version: 9.4.5
Operating system: Debian 8.2
Description:
'CREATE DATABASE .. OWNER ..' creates a database owned by the correct user,
but containing a schema apparently owned by the user running 'CREATE
DATABASE'. This causes us a problem when our test code tries to 'DROP SCHEMA
public CASCADE' (as a way of clearing the database) as the database owner.
example:
PGHOST=127.0.0.1 psql template1 postgres
Password for user postgres:
psql (9.4.5)
Type "help" for help.
template1=# create user test;
CREATE ROLE
template1=# create database test owner test;
CREATE DATABASE
template1=# \c test
You are now connected to database "test" as user "postgres".
test=# \dn
List of schemas
Name | Owner
--------+----------
public | postgres
(1 row)
test=#