From: Jim C. Nasby <jim@nasby.net>
To: Richard Ray <rray@mstc.state.ms.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to remove a superuser
Date: Tue, 10 Oct 2006 20:15:35 -0500
Message-ID: <20061011011535.GX72517@nasby.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0610101604330.12126@rray.drdc.mstc.ms.gov>
References: <Pine.LNX.4.64.0610101419170.12126@rray.drdc.mstc.ms.gov>
<20061010204123.GR72517@nasby.net>
<Pine.LNX.4.64.0610101604330.12126@rray.drdc.mstc.ms.gov>
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jim@nasby.net, rray@mstc.state.ms.us
Subject: Re: How to remove a superuser
In-Reply-To: <20061011011535.GX72517@nasby.net>
References: <Pine.LNX.4.64.0610101419170.12126@rray.drdc.mstc.ms.gov> <20061010204123.GR72517@nasby.net> <Pine.LNX.4.64.0610101604330.12126@rray.drdc.mstc.ms.gov> <20061011011535.GX72517@nasby.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox