Discussion:
[ADMIN] Read Only Role
(too old to reply)
senthilnathan
2011-11-30 05:52:14 UTC
Permalink
Is there any simple way to define read only roles. Basically that user should
be able to login and be able to do *select* statements alone. It should be
applied for all tables in all schemas in a database.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Read-Only-Role-tp5034628p5034628.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
M. D.
2011-12-01 00:05:48 UTC
Permalink
Post by senthilnathan
Is there any simple way to define read only roles. Basically that user should
be able to login and be able to do *select* statements alone. It should be
applied for all tables in all schemas in a database.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Read-Only-Role-tp5034628p5034628.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
Google is your friend:
http://stackoverflow.com/questions/760210/how-do-you-create-a-read-only-user-in-postgresql
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
CS DBA
2011-12-02 01:19:57 UTC
Permalink
Post by M. D.
Post by senthilnathan
Is there any simple way to define read only roles. Basically that user should
be able to login and be able to do *select* statements alone. It should be
applied for all tables in all schemas in a database.
--
http://postgresql.1045698.n5.nabble.com/Read-Only-Role-tp5034628p5034628.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
http://stackoverflow.com/questions/760210/how-do-you-create-a-read-only-user-in-postgresql
I think you can do this:

ALTER USER [user] SET TRANSACTION READ ONLY;
--
---------------------------------------------
Kevin Kempter - Constent State
A PostgreSQL Professional Services Company
www.consistentstate.com
---------------------------------------------
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
senthilnathan
2011-12-02 05:31:15 UTC
Permalink
Its a session variable. It can be reset(Read Write Mode) by the user itself

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Read-Only-Role-tp5034628p5040717.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
ashok raj
2011-12-04 01:18:24 UTC
Permalink
GRANT SELECT on all tables in schema public to user12 ;
Post by senthilnathan
Its a session variable. It can be reset(Read Write Mode) by the user itself
--
http://postgresql.1045698.n5.nabble.com/Read-Only-Role-tp5034628p5040717.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
http://www.postgresql.org/mailpref/pgsql-admin
--
Regards,
Ashokraj
9940419867
Loading...