|
Home > Archive > PostgreSQL Administration > October 2006 > How to remove a superuser
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to remove a superuser
|
|
| Richard Ray 2006-10-25, 8:24 am |
| 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.
Thanks
Richard Ray
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Richard Ray 2006-10-25, 8:24 am |
| On Tue, 10 Oct 2006, Jim C. Nasby wrote:
> On Tue, Oct 10, 2006 at 02:22:53PM -0500, Richard Ray wrote:
>
> 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
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
| |
| Jim C. Nasby 2006-10-25, 8:24 am |
| On Tue, Oct 10, 2006 at 04:07:19PM -0500, Richard Ray wrote:
> On Tue, 10 Oct 2006, Jim C. Nasby wrote:
>
>
> 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)
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Richard Ray 2006-10-25, 8:24 am |
| On Tue, 10 Oct 2006, Tom Lane wrote:
> Richard Ray <rray@mstc.state.ms.us> writes:
>
> You don't need to reassign the type's ownership, because it's just part
> of the view.
>
After I reassigned all the views I was allowed to drop the user.
Thanks
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|
|
|
|
|