Skip site navigation (1) Skip section navigation (2)

Re: How to remove a superuser

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Richard Ray <rray(at)mstc(dot)state(dot)ms(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to remove a superuser
Date: 2006-10-11 01:15:35
Message-ID: 20061011011535.GX72517@nasby.net (view raw or flat)
Thread:
Lists: pgsql-admin
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(at)nasby(dot)net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

In response to

pgsql-admin by date

Next:From: Fourat ZouariDate: 2006-10-11 11:30:22
Subject: Re: Copying data from table to table (cloned tables)
Previous:From: Jim C. NasbyDate: 2006-10-11 01:13:47
Subject: Re: Recursive use

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group