Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Restoring a database as another user



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group