Hi, for some cleaning up I'd like to drop a certain role. Now DROP ROLE yields an error and complains about 271 objects being owned by this role. Is there an easy way to switch ownership of those objects to another role? At least, is there a way to store those dependencies as a file? The contents of the 4th tab of the role-object in pgAdmin would be nice but I cant save it or copy it out. It lists which objects depend on the role. regards ...
Andreas wrote: > Hi, > for some cleaning up I'd like to drop a certain role. > Now DROP ROLE yields an error and complains about 271 objects being > owned by this role. > > Is there an easy way to switch ownership of those objects to another role? Yes, see REASSIGN OWNED (gives ownership to something else) and DROP OWNED (drops grants and removes objects owned). Normally you run both in that order. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера