X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5D82311F6008 for ; Fri, 28 Apr 2006 04:17:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 02499-08 for ; Fri, 28 Apr 2006 04:17:32 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id 7E54111F603C for ; Fri, 28 Apr 2006 04:17:30 -0300 (ADT) Received: by pproxy.gmail.com with SMTP id x66so2224560pye for ; Fri, 28 Apr 2006 00:17:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=gEdeCZTsxjcvRI+I6djKvi0jxp8e7CDVZIRXRnkJcZi4Dc0R7cA9Ofvyr8lDPH76N5GrLzV/nq2AeQxIH/o7/tpTaYHdE8HbScmVdGVoIppH/2DCvB7wyMVoST1sGpCrpiu5BhXqp4wuDh5uZnEjUsvZutzM7Z8Y4NJNBPs6jJY= Received: by 10.35.119.11 with SMTP id w11mr1710515pym; Fri, 28 Apr 2006 00:17:30 -0700 (PDT) Received: by 10.35.114.15 with HTTP; Fri, 28 Apr 2006 00:17:30 -0700 (PDT) Message-ID: <7c33d060604280017v43b0e35au2662bd9a9b40350@mail.gmail.com> Date: Fri, 28 Apr 2006 14:17:30 +0700 From: "David Garamond" To: pgsql-admin@postgresql.org Subject: Restoring a database as another user MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5136_2901092.1146208650731" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/323 X-Sequence-Number: 21492 ------=_Part_5136_2901092.1146208650731 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline My goal is to restore someone's (e.g. Jim's) database by the superuser to b= e 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 ------=_Part_5136_2901092.1146208650731 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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

------=_Part_5136_2901092.1146208650731--