inconsistent owners in newly created databases? - Mailing list pgsql-hackers

From Fabien COELHO
Subject inconsistent owners in newly created databases?
Date
Msg-id Pine.LNX.4.58.0404301730370.25655@sablons.cri.ensmp.fr
Whole thread Raw
Responses Re: inconsistent owners in newly created databases?
List 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@cri.ensmp.fr


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Current CVS tip segfaulting
Next
From: Fabien COELHO
Date:
Subject: Re: Current CVS tip segfaulting