Skip site navigation (1) Skip section navigation (2)

inconsistent owners in newly created databases?

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: inconsistent owners in newly created databases?
Date: 2004-04-30 15:57:27
Message-ID: Pine.LNX.4.58.0404301730370.25655@sablons.cri.ensmp.fr (view raw or flat)
Thread:
Lists: pgsql-hackers
Dear hackers,

It seems to me that the current default setup for a new database which is
given to some user is not consistent (createdb -O calvin foo or
CREATE DATABASE foo WITH OWNER calvin).

Indeed, although the database belongs to the owner, the "public" schema
still belongs to the database super user, as it was the case in template1.
As a consequence, the owner of the database CANNOT change the rights of
the schema, hence he cannot prevent anyone from creating a new table in
the public schema! However, has he owns the database, he can prevent user
from creating temporary tables... Not really consistent.

Dropping (the owner of a database can do that) and recreating the schema
is not a real fix, because all installation performed on template1
(plpgsql, functions...) would be lost.

So it seems to me that the "public" schema should also belong to the owner
of the database. I cannot foresee all consequences, but the current
situation is really inconsistent.

Any comment?

-- 
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

Responses

pgsql-hackers by date

Next:From: Fabien COELHODate: 2004-04-30 16:03:51
Subject: Re: Current CVS tip segfaulting
Previous:From: Alvaro HerreraDate: 2004-04-30 15:21:52
Subject: Re: Current CVS tip segfaulting

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group