Re: dangling permission on tables after drop user.
От
Alvaro Herrera
Тема
Re: dangling permission on tables after drop user.
Дата
Msg-id
20040930140329.GC5151@dcc.uchile.cl
Ответ на
Re: dangling permission on tables after drop user. (Vivek Khera)
Список
Дерево обсуждения
dangling permission on tables after drop user. Vivek Khera <khera@kcilink.com>
Re: dangling permission on tables after drop user. Richard Huxton <dev@archonet.com>
Re: dangling permission on tables after drop user. Vivek Khera <khera@kcilink.com>
Re: dangling permission on tables after drop user. Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: dangling permission on tables after drop user. Vivek Khera <khera@kcilink.com>
Re: dangling permission on tables after drop user. Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: dangling permission on tables after drop user. Andrew Sullivan <ajs@crankycanuck.ca>
Re: dangling permission on tables after drop user. Tom Lane <tgl@sss.pgh.pa.us>
On Thu, Sep 30, 2004 at 09:32:30AM -0400, Vivek Khera wrote: > > On Sep 29, 2004, at 5:35 PM, Alvaro Herrera wrote: > > >>>Am I missing something Vivek, or should the gross hack be "creating a > >>>user with id=102" ? > >> > >>And how exactly does one accomplish this? pg_users is a view so you > >>can't insert into it. > > > >CREATE USER ... WITH SYSID 102; > > Ok. I did that. So now how do I get rid of that user and all the > grants? DROP USER ends up with the dangling GRANTs still hanging > about. > > Is there no way to drop a user and have the necessary grants disappear? > How does one drop a user cleanly? I'm afraid you'll have to ALTER TABLE (or whatever) for each of these ... I don't think there is a command that would help you do that automatically. You can cheat by looking at system catalogs for the acl column (e.g. pg_class.relacl) and using that in a function. -- Alvaro Herrera () "El sentido de las cosas no viene de las cosas, sino de las inteligencias que las aplican a sus problemas diarios en busca del progreso." (Ernesto Hernández-Novich)
В списке pgsql-general по дате отправления