BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres

Поиск
Список
Период
Сортировка
От xelah-postgresql@xelah.com
Тема BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres
Дата
Msg-id 20151124121258.435.64678@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres
Re: BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres
Список pgsql-bugs
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=#

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

Предыдущее
От: pinker
Дата:
Сообщение: Re: pg_dump - wrong order with inheritance
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres