pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedgranting all to user
4+ messages / 3 participants
[nested] [flat]
* granting all to user
@ 2002-01-07 21:01 Jodi Kanter <jkanter@virginia.edu>
0 siblings, 3 replies; 4+ messages in thread
From: Jodi Kanter @ 2002-01-07 21:01 UTC (permalink / raw)
To: pgsql-admin
Can I grant a user all privileges to all the tables without having to type a
grant command for each table individually?
I know that I can use:
grant all on object to username
but I would like to set this person up as a superuser for now so that he can
assist with development.
It appears that when I set up users the default is NOT to give them access
to any of the tables. I would like to have the default set so that users can
read all the tables and then have the option to give this one particular
person full access.
Any suggestions???
thanks
Jodi
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: granting all to user
@ 2002-01-07 21:22 Nick Fankhauser <nickf@ontko.com>
parent: Jodi Kanter <jkanter@virginia.edu>
2 siblings, 0 replies; 4+ messages in thread
From: Nick Fankhauser @ 2002-01-07 21:22 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; pgsql-admin
There's no command to essentially grant <priv> on all to a user, but it's
pretty easy to write a select that produces a bunch of grant statements for
you based on the system tables. then you log the results & run them...
-Nick
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Jodi Kanter
> Sent: Monday, January 07, 2002 4:02 PM
> To: Postgres Admin List
> Subject: [ADMIN] granting all to user
>
>
> Can I grant a user all privileges to all the tables without
> having to type a
> grant command for each table individually?
>
> I know that I can use:
> grant all on object to username
>
> but I would like to set this person up as a superuser for now so
> that he can
> assist with development.
>
> It appears that when I set up users the default is NOT to give them access
> to any of the tables. I would like to have the default set so
> that users can
> read all the tables and then have the option to give this one particular
> person full access.
>
> Any suggestions???
> thanks
> Jodi
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: granting all to user
@ 2002-01-07 21:28 Nick Fankhauser <nickf@ontko.com>
parent: Jodi Kanter <jkanter@virginia.edu>
2 siblings, 0 replies; 4+ messages in thread
From: Nick Fankhauser @ 2002-01-07 21:28 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; pgsql-admin
I should have just given you this example in my earlier reply- this is how I
quickly get a batch of grant statements- you can probably modify it for your
needs:
select 'grant select on '||relname||'to "www-data";' from pg_class where
relname not like 'pg%';
-Nick
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Jodi Kanter
> Sent: Monday, January 07, 2002 4:02 PM
> To: Postgres Admin List
> Subject: [ADMIN] granting all to user
>
>
> Can I grant a user all privileges to all the tables without
> having to type a
> grant command for each table individually?
>
> I know that I can use:
> grant all on object to username
>
> but I would like to set this person up as a superuser for now so
> that he can
> assist with development.
>
> It appears that when I set up users the default is NOT to give them access
> to any of the tables. I would like to have the default set so
> that users can
> read all the tables and then have the option to give this one particular
> person full access.
>
> Any suggestions???
> thanks
> Jodi
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: granting all to user
@ 2002-01-07 22:00 Peter Eisentraut <peter_e@gmx.net>
parent: Jodi Kanter <jkanter@virginia.edu>
2 siblings, 0 replies; 4+ messages in thread
From: Peter Eisentraut @ 2002-01-07 22:00 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin
Jodi Kanter writes:
> Can I grant a user all privileges to all the tables without having to type a
> grant command for each table individually?
No. Sorry.
Typing can be automated, of course.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-01-07 22:00 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-07 21:01 granting all to user Jodi Kanter <jkanter@virginia.edu>
2002-01-07 21:22 ` Nick Fankhauser <nickf@ontko.com>
2002-01-07 21:28 ` Nick Fankhauser <nickf@ontko.com>
2002-01-07 22:00 ` Peter Eisentraut <peter_e@gmx.net>
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