From: David Garamond <davidgaramond@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Restoring a database as another user
Date: Fri, 28 Apr 2006 14:17:30 +0700
Message-ID: <7c33d060604280017v43b0e35au2662bd9a9b40350@mail.gmail.com> (raw)
My goal is to restore someone's (e.g. Jim's) database by the superuser to be
owned by a new user (e.g. Bob). Jim and Bob connects using password and I
(the superuser) do not know their passwords.
Is it possible to do pg_restore, connecting as the superuser, specifying
--no-owner, but making so that all objects now be owned by the new user (e.g.
Bob)? Or do I have to resort to other tricks (like doing ALTER OWNER later,
or modifying pg_hba.conf temporarily so the superuser can connect as Jim
without a password)?
Regards,
Dave
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: davidgaramond@gmail.com
Subject: Re: Restoring a database as another user
In-Reply-To: <7c33d060604280017v43b0e35au2662bd9a9b40350@mail.gmail.com>
References: <7c33d060604280017v43b0e35au2662bd9a9b40350@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox