Search Postgresql Archives

owner of a database does not own "public" schema?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I was playing around with schemas and noticed that that the owner of a the database (specified with the CREATE DATABASE command) is not the owner of the database's public schema:

(Connect as super user)

c:\temp>psql postgres postgres
Password for user postgres:
psql (8.4.3)
Type "help" for help.

postgres=# create user foo password 'bar';
CREATE ROLE
postgres=# create database foo owner = foo encoding = 'UTF-8';
CREATE DATABASE
postgres=# \q


c:\>psql foo foo
Password for user foo:
psql (8.4.3)
Type "help" for help.

foo=> drop schema public;
ERROR:  must be owner of schema public
foo=>

(As you can see, I'm using Postgres 8.4.3 on Windows)

I understand that I could grant the necessary privileges to the role after creating the database.
I'm just curious why the databse owner is not the owner of the public schema.


Regards
Thomas


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux