Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id D90EE9FB449 for ; Tue, 10 Oct 2006 22:15:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 82541-08 for ; Wed, 11 Oct 2006 01:15:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 658219FB3AA for ; Tue, 10 Oct 2006 22:15:37 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 0277B56437; Tue, 10 Oct 2006 20:15:36 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 10 Oct 2006 20:15:35 -0500 Date: Tue, 10 Oct 2006 20:15:35 -0500 From: "Jim C. Nasby" To: Richard Ray Cc: pgsql-admin@postgresql.org Subject: Re: How to remove a superuser Message-ID: <20061011011535.GX72517@nasby.net> References: <20061010204123.GR72517@nasby.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:061011:rray@mstc.state.ms.us::8f4fEBEZZvuIZbX6:0000000000000000 00000000000000000000000072vL X-Hashcash: 1:20:061011:pgsql-admin@postgresql.org::vJntNmlrVi5LaJaB:00000000000 00000000000000000000000023JS X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/77 X-Sequence-Number: 23380 On Tue, Oct 10, 2006 at 04:07:19PM -0500, Richard Ray wrote: > On Tue, 10 Oct 2006, Jim C. Nasby wrote: > > >On Tue, Oct 10, 2006 at 02:22:53PM -0500, Richard Ray wrote: > >>I need to drop a superuser account. I get > >> > >>dba=# drop role bram; > >>ERROR: role "bram" cannot be dropped because some objects depend on it > >>DETAIL: owner of view teacher > >>owner of type teacher > >>owner of view temp1 > >>owner of type temp1 > >>... > >> > >>What is the preferred method. > > > >You need to reassign ownership of those objects to someone else. > > > > I can reassign the view but not the type. > > > Welcome to psql 8.1.0, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help with psql commands > \g or terminate with semicolon to execute query > \q to quit > > dba=# alter table teacher owner to bjay; > ALTER TABLE > dba=# alter type teacher owner to bjay; > ERROR: "teacher" is a table's row type Yes, unfortunately you'll have to re-create the view as another owner. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)