From: | "Alex Ignatov \(postgrespro\)" <a(dot)ignatov(at)postgrespro(dot)ru> |
---|---|
To: | "'Thomas Kellerer'" <spam_eater(at)gmx(dot)net>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Drop user cascade |
Date: | 2016-10-19 11:14:31 |
Message-ID: | 031401d229f9$f6f98970$e4ec9c50$@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Thomas Kellerer
Sent: Wednesday, October 19, 2016 1:53 PM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Drop user cascade
Alex Ignatov (postgrespro) schrieb am 19.10.2016 um 12:26:
> Hello!
>
> Why we can DROP TABLE CASCADE, DROP VIEW CASCADE, DROP SEQUENCE CASCADE but we can’t DROP USER/ROLE CASCADE?
>
> Why do Postgres have no such functionality as DROP USER CASCADE? Is there any reasons in that absence?
You can do
drop owned by user_name;
drop user user_name;
Thomas
--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I know this commands thank yo =).
To use them you need to invoke this command in all database because roles sit atop of PG database or you need to find DBs which has objects that depend on ROLE you want to delete. You can't do anything with objects in DB you are not connected
--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2016-10-19 11:49:17 | Re: journaled FS and and WAL |
Previous Message | Thomas Kellerer | 2016-10-19 10:53:05 | Re: Drop user cascade |