Re: restore database with schema: owner schema must have - Mailing list pgsql-admin

From Pedro Salazar
Subject Re: restore database with schema: owner schema must have
Date
Msg-id 1050937340.14571.10.camel@vitoria.intra.cet.pt
Whole thread Raw
In response to Re: restore database with schema: owner schema must have superuser privileges?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Mon, 2003-04-21 at 14:50, Tom Lane wrote:
> Pedro Salazar <pedro-b-salazar@ptinovacao.pt> writes:
> > I have a database which has a schema owned by a user (with no superuser
> > privileges). When restoring the dump file with my superuser database,
> > the dump script connects with my owner user (which I created before),
> > and tries to create the schema with that user, and of course it cannot
> > do it, because my owner user hasn't super user privileges that permits
> > create a schema!
>
> You don't need superuser privs to create a schema, only CREATE privs on
> the database.  Why would you have revoked CREATE-schema privs from the
> database owner??  Seems downright weird.
>
> pg_dump does have some known problems with situations where a
> previously-held right has been revoked.  I guess this is another one for
> the to-do list.

You're right. Indeed, is enough the CREATE privileges in that schema and
not a superuser privilege. However, it wasn't a issue of revoking CREATE
SCHEMA privilege to the owner of the database, but a issue of the owner
of schema isn't the owner of the database.

Thanks for your help,
PS


Attachment

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: restore database with schema: owner schema must have superuser privileges?
Next
From: "Mario Alberto Soto Cordones"
Date:
Subject: max connection limit