Re: Drop user cascade

From: "Alex Ignatov \(postgrespro\)" <a(dot)ignatov(at)postgrespro(dot)ru>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Drop user cascade
Date: 2016-10-19 14:03:20
Message-ID: 035801d22a11$8c6f9820$a54ec860$@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 Tom Lane
Sent: Wednesday, October 19, 2016 4:31 PM
To: Alex Ignatov (postgrespro) <a(dot)ignatov(at)postgrespro(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Drop user cascade

"Alex Ignatov \(postgrespro\)" <a(dot)ignatov(at)postgrespro(dot)ru> writes:
> Why do Postgres have no such functionality as DROP USER CASCADE? Is
> there any reasons in that absence?

The short answer is that DROP USER couldn't reach across databases to get
rid of owned objects in other databases. See

https://www.postgresql.org/docs/9.6/static/role-removal.html

regards, tom lane

--
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

Some security consideration bear in mind that DROP OWNED cant delete own
objects in other DBs? In general what stops us to do inter DBs connection
like MSSQL?

--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com The Russian Postgres
Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2016-10-19 14:22:29 Re: json rendering without pretty option (compact)
Previous Message Tom Lane 2016-10-19 13:31:27 Re: Drop user cascade