refactoring a database owner without "reassign owned"

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема refactoring a database owner without "reassign owned"
Дата
Msg-id CAMkU=1zz66h_NfnRPZdyWO=kaUeL6Vj5yJ9WcgMCZTNSoPhbwQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: refactoring a database owner without "reassign owned"  (Vincent Veyron <vv.lists@wanadoo.fr>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Ray Stell
Дата:
Сообщение: pg_upgrade -u
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Does it make sense to break a large query into separate functions?