Re: GRANT all to a super user - Mailing list pgsql-general

From Andrew Gould
Subject Re: GRANT all to a super user
Date
Msg-id d356c5630905270730v5ce401a4ic1b209d2b5992927@mail.gmail.com
Whole thread Raw
In response to GRANT all to a super user  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
On Wed, May 27, 2009 at 9:19 AM, Gauthier, Dave <dave.gauthier@intel.com> wrote:

What is the (is there a) grant command that I can use to create a super user without having to specify all the DB objects? 

grant all on database foo to thesuper;

and

grant all privileges on database foo to thesuper;

Don’t work.

I know I can achieve what I want by submitting a grant for each and every object in the DB.  But is there a way to do it all with one command, maybe something like...

“grant all privileges on everything to thesuper”  ?

Thanks

-dave


There is a '-s' option for createuser that designates the user account as a superuser.

You can use 'alter user' or 'alter role' to give superuser authority to an existing account:

alter user [account name] with superuser;

I think the superuser role applies to all databases.

Andrew

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: GRANT all to a super user
Next
From: Emanuel Calvo Franco
Date:
Subject: Re: How to Install Postgres 8.3 in Solaris 10 as a service