Re: dropping a user causes pain (#2) - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: dropping a user causes pain (#2)
Date
Msg-id 3F370447.5080603@dunslane.net
Whole thread Raw
In response to dropping a user causes pain (#2)  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
The docs (new and old) explicitly state you can do this; see for example 
http://www.postgresql.org/docs/7.3/static/sql-dropuser.html

But ISTM that in such a case the user's objects should possibly be 
reassigned to the database owner (who can't be dropped), in kinda the 
same way that a *nix process that is orphaned is reparented to init. I 
guess that might break other things, or would it?

Or maybe we need 'drop user foo with cascade'.

Or both.

cheers

andrew


Christopher Kings-Lynne wrote:

>Hi,
>
>I dropped the owner of a table (with no complaints), and now I get this:
>
>psql:
>
>asdf=# \dt
>         List of relations
> Schema | Name | Type  |   Owner
>--------+------+-------+------------
> public | a1   | table |
>
>pg_dump:
>
>pg_dump: WARNING: owner of data type "a1" appears to be invalid
>pg_dump: WARNING: owner of table "a1" appears to be invalid
>
>Didn't there used to be a check that occurred, preventing you from dropping
>a user who owned objects?
>
>Chris
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>  
>



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: dropping a user causes pain (#2)
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: dropping a user causes pain (#2)