Thread: backup: restoring, problems with permissions

backup: restoring, problems with permissions

From
Dado Feigenblatt
Date:
I'm getting close to releasing a database for use so I changed some user
passwords,
which use to be the same for every user, including postgres.

Now I have this problem in psql:

when conected as postgres (or other user) I can only use
    \c database newuser
if the newuser password is the same as the current user.

So when using psql to restore pg_dumps, psql is choking on those cases,
as it tries switching to another user before creating the tables.

Should I create everything as user postgres and change ownership later?
Is that actually possible?
Can I change pg_database.datdba and pg_class.relowner to another user id
without breaking anything?

What am I missing?

Thanks

--
Dado Feigenblatt                                 Wild Brain, Inc.
Technical Director                               (415) 216-2053
dado@wildbrain.com                               San Francisco, CA.