Thread: postgre suoer

postgre suoer

From
"nabakumar salam"
Date:
I have a single user role configured for my postgre database 8.2
The user is a super user.
I opened the property window of this user and deselect the super user check box.
It gave me a warning. I select OK.
I was expecting that it would not allow removing that super user rights as it is the only super user in my DB.

now my database is without any user  with super user rights.
How do I create one now or get back the previous super user?
Can anybody give me some pointers??

Thanks in advance,
Naba

Re: postgre suoer

From
Tom Lane
Date:
"nabakumar salam" <salamnabakumar@gmail.com> writes:
> I was expecting that it would not allow removing that super user rights as
> it is the only super user in my DB.

Superusers are assumed to be careful enough not to shoot themselves in
the foot like that.  I suggest not experimenting with things like
"delete from pg_proc;" either ;-)

> now my database is without any user  with super user rights.
> How do I create one now or get back the previous super user?

Shut down the postmaster, start a standalone backend, create a superuser
using CREATE USER, restart the postmaster.  You're always super inside
a standalone backend.

            regards, tom lane