Let's say you have a database which is owned (as well as all the contents
within it) by the postgres internal user.

Having created or inherited a mess, how do you fix it?

database1=# REASSIGN OWNED BY postgres TO foo ;

ERROR:  cannot reassign ownership of objects owned by role postgres because
they are required by the database system

Is there some way simpler than going through every object of every type and
doing an "ALTER <TYPE> <OBJECTNAME> OWNER to..." ?

This is on 9.2.4, but I think it applies to all versions.

Cheers,

Jeff

Reply via email to