I'm pretty sure 8.4 requires that you GRANT on individual tables, rather 
than at a database level. I'm not aware of a way to do it, but I wouldn't 
be surprised if someone's Postgres-fu is better than mine.

If you can upgrade to 9.x, you can do something like this:

    GRANT SELECT ON ALL TABLES IN SCHEMA public TO some_user;

Keep in mind that if you're using a schema other than the default (public), 
you'll need to alter that statement a bit.

There's good info in this StackOverflow thread I have bookmarked. 
Coincidentally, this also covers read only, in addition to some caveats. I 
was initially looking for a way to grant on all like you can in MySQL.

http://stackoverflow.com/questions/760210/how-do-you-create-a-read-only-user-in-postgresql



On Tuesday, January 22, 2013 6:23:07 PM UTC-5, glittle wrote:
>
> This seems like a silly question, but how does one grant permissions 
> on a database to a newly-created user in postgres 8.4?  Ideally, I'd 
> like to just give read-only, but apparently that's hard to do in 8.4. 
> But short of granting permissions on every table specifically, is 
> there no command to do the equivalent of "grant select on database.* 
> to user"? 
>
> Thanks... 
>
> -glenn 
>

-- 
-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby


Reply via email to