Re: owner orphaned databases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: owner orphaned databases
Date: 2004-08-27 05:00:21
Message-ID: 6435.1093582821@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CSN <cool_screen_name90001(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2004-08-27 05:37:08 Re: Creating Functions in Separate Schema
Previous Message Tom Lane 2004-08-27 03:49:46 Re: performance of IN (subquery)