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