pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: matthias ritzkowski <matthias@marlinmobile.com>
To: pgsql-admin@postgresql.org
Subject: Best practice to create a read-only user?
Date: Fri, 3 May 2013 10:03:02 -0400
Message-ID: <20130503100302.0000043e@unknown> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hello,

Usually I would 

create user uuu password 'ppp';
GRANT usage on schema zzz to uuu;
GRANT select on all tables in schema zzz to uuu;


But just this morning someone used 
create user uuu password 'ppp';
alter user uuu set default_transaction_read_only = on;
GRANT select on all tables in schema zzz to uuu;

So I only added the grant usage and it worked fine. 
What do people use day to day?

I had frankly never explored the default_transaction_read_only
parameter ...


-- 

regards
Matthias Ritzkowski
-marlinmobile-


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (3+ messages)  latest in thread

Message-ID: <20130503100302.0000043e@unknown>
Permalink:  ../20130503100302.0000043e@unknown/
Also on:    postgresql.org/message-id/20130503100302.0000043e@unknown

 · 

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: matthias@marlinmobile.com
  Subject: Re: Best practice to create a read-only user?
  In-Reply-To: <20130503100302.0000043e@unknown>

* 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