Re: owner orphaned databases - Mailing list pgsql-general

From Tom Lane
Subject Re: owner orphaned databases
Date
Msg-id 6435.1093582821@sss.pgh.pa.us
Whole thread Raw
In response to owner orphaned databases  (CSN <cool_screen_name90001@yahoo.com>)
List pgsql-general
CSN <cool_screen_name90001@yahoo.com> writes:
> Maybe it shouldn't be possible to delete a
> user while it still owns databases,

You mean like this?

regression=# create user foo;
CREATE USER
regression=# create database foo owner foo;
CREATE DATABASE
regression=# drop user foo;
ERROR:  user "foo" cannot be dropped
DETAIL:  The user owns database "foo".
regression=#

There are plenty of related scenarios that we don't cover, but AFAIR
that particular interlock has always been there.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: performance of IN (subquery)
Next
From: Tino Wildenhain
Date:
Subject: Re: Creating Functions in Separate Schema