pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: René Romero Benavides <ichbinrene@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Creating a Read Only profile in 8.4
Date: Fri, 08 Jun 2012 14:13:21 -0500
Message-ID: <4FD24ED1.10201@gmail.com> (raw)
In-Reply-To: <11689.1339163954@sss.pgh.pa.us>
References: <F1CFB1E7A51CD846898BB039F441E04F095A53C641@elijah>
	<11689.1339163954@sss.pgh.pa.us>

Am 08.06.2012 08:59, schrieb Tom Lane:
> "Della-Croce, Gregory"<Greg_Della-Croce@wycliffe.org>  writes:
>> I am new at the Postgres DBA - Admin stuff.   So when asked to create a read only profile for our database in Postgres 8.4 I did the following:
>> *         create role RO_User password 'xxxxxxxxxxx' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;
>> *         select 'grant select on ' || tablename || ' to \"RO_User\"; 'from pg_tables where schemaname = 'public';
> Uh, that only printed the GRANT commands you needed, it didn't execute
> them.
>
> 			regards, tom lane
>
You'll need to grant usage on the schema to your RO_User role as well.

GRANT USAGE ON SCHEMA public TO RO_User;

for each database you'll allow him to connect to.
-- 
pglearn.blogspot.mx:postgresql recipes <http://pglearn.blogspot.mx/;
*Twitter*.You might consider to follow *@sqlhotfix*

view thread (5+ messages)

Message-ID: <4FD24ED1.10201@gmail.com>
Permalink:  ../4FD24ED1.10201@gmail.com/
Also on:    postgresql.org/message-id/4FD24ED1.10201@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ichbinrene@gmail.com
  Subject: Re: Creating a Read Only profile in 8.4
  In-Reply-To: <4FD24ED1.10201@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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