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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2004-04-30 16:03:51 Re: Current CVS tip segfaulting
Previous Message Alvaro Herrera 2004-04-30 15:21:52 Re: Current CVS tip segfaulting