| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Andrus" <kobruleht2(at)hot(dot)ee> |
| Cc: | "Thom Brown" <thom(at)linux(dot)com>, "Adrian Klaver" <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: How to drop user if objects depend on it |
| Date: | 2015-10-07 18:52:00 |
| Message-ID: | 7608.1444243920@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Andrus" <kobruleht2(at)hot(dot)ee> writes:
>> A little further review shows that DROP OWNED is the way to get rid of
>> leftover privileges. So in general you need to do REASSIGN OWNED to move
>> the ownership of objects, then DROP OWNED to get rid of privileges granted
>> on non-owned objects, before you can drop a role.
> I tried this in database mydb using script below but still got error
> ERROR: role "vantaa" cannot be dropped because some objects depend on it
> DETAIL: privileges for database mydb
The example script works for me. What PG version are you running? I have
a vague recollection that we've fixed bugs-of-omission in DROP OWNED in
the past.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steve Pribyl | 2015-10-07 18:58:39 | Re: backup.old |
| Previous Message | Rob Sargent | 2015-10-07 18:12:48 | Re: using postgresql for session |