Re: Drop user cascade

From: "Alex Ignatov \(postgrespro\)" <a(dot)ignatov(at)postgrespro(dot)ru>
To: "'Melvin Davidson'" <melvin6925(at)gmail(dot)com>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Drop user cascade
Date: 2016-10-19 15:08:47
Message-ID: 038401d22a1a$b10a1530$131e3f90$@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Melvin Davidson
Sent: Wednesday, October 19, 2016 5:35 PM
To: Alex Ignatov (postgrespro) <a(dot)ignatov(at)postgrespro(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Drop user cascade

On Wed, Oct 19, 2016 at 10:03 AM, Alex Ignatov (postgrespro) <a(dot)ignatov(at)postgrespro(dot)ru <mailto:a(dot)ignatov(at)postgrespro(dot)ru> > wrote:

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org <mailto:pgsql-general-owner(at)postgresql(dot)org>
[mailto: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 <mailto:pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Drop user cascade

"Alex Ignatov \(postgrespro\)" <a(dot)ignatov(at)postgrespro(dot)ru <mailto: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 <mailto: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

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org <mailto:pgsql-general(at)postgresql(dot)org> )
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

>In general what stops us to do inter DBs connection like MSSQL?

It currently is not generic to PostgreSQL, but you can do that with the dblink extension/functions.

--

Melvin Davidson
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you. <http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif>

I know about dblink =)

The question was – is there any caveats to not allow xross db access. Maybe some security considerations prevent to implement it.

We all know that PG = one process rules multiple DBs why not to allow direct access to another DB. We have one transaction counter and so on where is the problems if any?

--

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Timofei Dynikov 2016-10-19 16:27:25 How to build custom rpm package for postgres 9.4.4
Previous Message Melvin Davidson 2016-10-19 14:34:39 Re: Drop user cascade