create database with owner

From: kobolds <dreammes2007(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: create database with owner
Date: 2013-04-19 11:53:18
Message-ID: 1366372398392-5752623.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

using postgres ( super user) , I create a database for user1 (normal role)

1. create database db1 owner user1;
2. \l

postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access
privileges
-----------+----------+----------+-------------+-------------+-----------------------
db1 | user1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres=CTc/postgres
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres=CTc/postgres
(4 rows)

3. login as user1 to db1
psql -d db1 -h 192.168.56.200 -U user1 -W

4. I want to remove public schema in db1 but i get error not the owner ,
when I do \dn+

db1=> \dn+
List of schemas
Name | Owner | Access privileges | Description
--------+----------+----------------------+------------------------
public | postgres | postgres=UC/postgres+| standard public schema
| | =UC/postgres |
(1 row)

Question?
1. since I create database with user1 as owner , why is it the public
schema created in db1 not own by user1?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/create-database-with-owner-tp5752623.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

Browse pgsql-novice by date

  From Date Subject
Next Message Diogo Martinez 2013-04-19 16:21:30 Database privileges
Previous Message JORGE MALDONADO 2013-04-17 21:58:23 PostgreSQL version upgrade (9.1 to 9.2)