From: | Thom Brown <thombrown(at)gmail(dot)com> |
---|---|
To: | Antonio Goméz Soto <antonio(dot)gomez(dot)soto(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to grant a user read-only access to a database? |
Date: | 2010-03-02 11:27:59 |
Message-ID: | bddc86151003020327j45d327a0pc1cb97d81ecdffe7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2 March 2010 11:12, Antonio Goméz Soto <antonio(dot)gomez(dot)soto(at)gmail(dot)com> wrote:
> Hi,
>
> I tried this:
>
> names=# grant select on database names to spice;
> ERROR: invalid privilege type SELECT for database
>
> The documentation seems to imply I need to grant SELECT
> to each table separately. That's a lot of work, and what if
> new tables are created?
>
> Thanks,
> Antonio
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
The privileges you can grant on a database are only related to the
creation of tables and connecting to that database.
You could create a role which has SELECT-only access, apply that role
to all your tables, and assign users (other roles) as members of that
role.
Regards
Thom
From | Date | Subject | |
---|---|---|---|
Next Message | Nilesh Govindarajan | 2010-03-02 11:46:57 | Re: How to grant a user read-only access to a database? |
Previous Message | Antonio Goméz Soto | 2010-03-02 11:12:23 | How to grant a user read-only access to a database? |