Thread: I can not drop a user/role because an object depent on it.
Dear my friends.... I can not drop a user because another object need it. How can I know which object need it? I really want to drop everything inside my PostgreSQL, to reset my installation really from beginning. postgres=# drop user ivia; FEHLER: kann Rolle »ivia« nicht löschen, weil andere Objekte davon abhängen DETAIL: Eigentümer von Datenbank iVia 7 Objekte in Datenbank iVia-->mytranslation: Error: can not delete Role »ivia«, because another object depend on it DETAIL: owner of Database iVia. postgres=# I've dropped the database iVia. Thank you very much in advance.
In response to Ricky Tompu Breaky <ricky.breaky@uni.de>: > Dear my friends.... > > I can not drop a user because another object need it. How can I know > which object need it? I really want to drop everything inside my > PostgreSQL, to reset my installation really from beginning. The easiest way to accomplish this is to stop postgres, delete the postgres data directory and rerun initdb. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/
You've solved my Problem, Bill. I thank you very much, my friend Bill Moran. Highly appreciated. On Wed, 30 Sep 2009 13:45:52 -0400 Bill Moran <wmoran@potentialtech.com> wrote: > In response to Ricky Tompu Breaky <ricky.breaky@uni.de>: > > > Dear my friends.... > > > > I can not drop a user because another object need it. How can I know > > which object need it? I really want to drop everything inside my > > PostgreSQL, to reset my installation really from beginning. > > The easiest way to accomplish this is to stop postgres, delete the > postgres data directory and rerun initdb. >
On Wednesday 30 September 2009 10:43:35 am Ricky Tompu Breaky wrote: > Dear my friends.... > > I can not drop a user because another object need it. How can I know > which object need it? I really want to drop everything inside my > PostgreSQL, to reset my installation really from beginning. > > postgres=# drop user ivia; > FEHLER: kann Rolle »ivia« nicht löschen, weil andere Objekte davon > abhängen DETAIL: Eigentümer von Datenbank iVia > 7 Objekte in Datenbank iVia-->mytranslation: Error: can not delete Role > »ivia«, because another object depend on it DETAIL: owner of Database > iVia. > postgres=# > > I've dropped the database iVia. > > Thank you very much in advance. To clarify did you try to DROP USER ivia before or after you dropped the database iVia ? -- Adrian Klaver aklaver@comcast.net
On Wed, 30 Sep 2009 11:38:19 -0700 Adrian Klaver <aklaver@comcast.net> wrote: > On Wednesday 30 September 2009 10:43:35 am Ricky Tompu Breaky wrote: > > Dear my friends.... > > > > I can not drop a user because another object need it. How can I know > > which object need it? I really want to drop everything inside my > > PostgreSQL, to reset my installation really from beginning. > > > > postgres=# drop user ivia; > > FEHLER: kann Rolle »ivia« nicht löschen, weil andere Objekte davon > > abhängen DETAIL: Eigentümer von Datenbank iVia > > 7 Objekte in Datenbank iVia-->mytranslation: Error: can not delete > > Role »ivia«, because another object depend on it DETAIL: owner of > > Database iVia. > > postgres=# > > > > I've dropped the database iVia. > > > > Thank you very much in advance. > > To clarify did you try to DROP USER ivia before or after you dropped > the database iVia ? > RB>It's solved. Thanks for your reply. You're correct, I wanted to drop RB>the user after I dropped the database. Now I know from you that in RB>PostgreSQL, I have to drop the user first before dropping the RB>database.
----- "Ricky Tompu Breaky" <ricky.breaky@uni.de> wrote: > On Wed, 30 Sep 2009 11:38:19 -0700 > Adrian Klaver <aklaver@comcast.net> wrote: > > > On Wednesday 30 September 2009 10:43:35 am Ricky Tompu Breaky > wrote: > > > Dear my friends.... > > > > > > I can not drop a user because another object need it. How can I > know > > > which object need it? I really want to drop everything inside my > > > PostgreSQL, to reset my installation really from beginning. > > > > > > postgres=# drop user ivia; > > > FEHLER: kann Rolle »ivia« nicht löschen, weil andere Objekte > davon > > > abhängen DETAIL: Eigentümer von Datenbank iVia > > > 7 Objekte in Datenbank iVia-->mytranslation: Error: can not > delete > > > Role »ivia«, because another object depend on it DETAIL: owner of > > > Database iVia. > > > postgres=# > > > > > > I've dropped the database iVia. > > > > > > Thank you very much in advance. > > > > To clarify did you try to DROP USER ivia before or after you > dropped > > the database iVia ? > > > > RB>It's solved. Thanks for your reply. You're correct, I wanted to > drop > RB>the user after I dropped the database. Now I know from you that in > RB>PostgreSQL, I have to drop the user first before dropping the > RB>database. Not to belabor the point, but you have it backwards. The database needs to be dropped first, then the role/user. The databaseis owned by the role/user. Adrian Klaver aklaver@comcast.net