Re: dropping a user causes pain (#2)

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dropping a user causes pain (#2)
Date: 2003-08-11 03:01:42
Message-ID: 169501c35fb4$e4a6e240$2800a8c0@mars
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ah OK, I must have been thinking of the database owner check. I'd vote for
(1) checking that they own no objects and by default owning all their stuff
to the database owner. Plus add an optional clause:

DROP USER foo OWNER TO bob;

Chris

----- Original Message -----
From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Sent: Monday, August 11, 2003 10:49 AM
Subject: Re: [HACKERS] dropping a user causes pain (#2)

>
> 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
> >
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message elein 2003-08-11 03:04:40 Windows on SuSE? 7.4
Previous Message Andrew Dunstan 2003-08-11 02:49:43 Re: dropping a user causes pain (#2)