Re: Rights in 7.4 - Mailing list pgsql-general

From Tom Lane
Subject Re: Rights in 7.4
Date
Msg-id 5176.1074109320@sss.pgh.pa.us
Whole thread Raw
In response to Re: Rights in 7.4  (Francisco Reyes <lists@natserv.com>)
Responses Re: Rights in 7.4  (Francisco Reyes <lists@natserv.com>)
List pgsql-general
Francisco Reyes <lists@natserv.com> writes:
> Should restores be always done by the super user?

If every object in the dump is owned by the same nonprivileged user,
it will work to restore as that user.  You can also use --no-owner
to get the same effect (everything winds up owned by the user running
restore).  If you are trying to copy a database that includes objects
of varying ownership, though, you gotta start as superuser.

Now that I think about it, the standard dump sequence will attempt to
set permissions and comment on the public schema, which will fail if
you're not superuser.  But it should be okay to ignore those errors.

            regards, tom lane

pgsql-general by date:

Previous
From: "Chris Ochs"
Date:
Subject: Re: Postgress and MYSQL
Next
From: Martin Marques
Date:
Subject: Documentation search (Was: Postgress and MYSQL)