Thread: How to Add User with Select Priviliges only

How to Add User with Select Priviliges only

From
"Bedorf, Paul"
Date:

Hi, I am new to Postgres SQL and have a task to add a user that will have permissions only to select from the database but not make any changes etc...

I do not know how to do that, can anyone provide instructions?

I have the following databases:

Name | Owner |
------------+----------+
mpower_dev | mpower |
postgres | postgres |
template0 | postgres |
template1 | postgres

I would like to grant the select only provileges to the new user on the mpower_dev database.

Thank You

 

 

__________________________________________________

Paul Bedorf 

 

Re: How to Add User with Select Priviliges only

From
Jayadevan M
Date:
Hello,
>
> I would like to grant the select only provileges to the new user on
> the mpower_dev database.
Something similar to this ?

http://archives.postgresql.org/pgsql-admin/2007-05/msg00305.php
Regards,
Jayadevan






DISCLAIMER:


"The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."





Re: How to Add User with Select Priviliges only

From
raghu ram
Date:


On Wed, Jun 27, 2012 at 12:52 AM, Bedorf, Paul <Paul.Bedorf@mosaic.com> wrote:

Hi, I am new to Postgres SQL and have a task to add a user that will have permissions only to select from the database but not make any changes etc...

I do not know how to do that, can anyone provide instructions?

I have the following databases:

Name | Owner |
------------+----------+
mpower_dev | mpower |
postgres | postgres |
template0 | postgres |
template1 | postgres

I would like to grant the select only provileges to the new user on the mpower_dev database.


Use below command to provide READ-ONLY user access for all tables available in schema:

Grant select on all tables in schema <schema_name> to <username>; 


--

Thanks & Regards,

Raghu Ram