Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 6975FD84656 for ; Fri, 8 Jun 2012 10:59:28 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sczip-0000rK-Hs for pgsql-admin@postgresql.org; Fri, 08 Jun 2012 13:59:28 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q58DxEiD011690; Fri, 8 Jun 2012 09:59:14 -0400 (EDT) From: Tom Lane To: "Della-Croce, Gregory" cc: "pgsql-admin@postgresql.org" Subject: Re: Creating a Read Only profile in 8.4 In-reply-to: References: Comments: In-reply-to "Della-Croce, Gregory" message dated "Fri, 08 Jun 2012 08:29:30 -0400" Date: Fri, 08 Jun 2012 09:59:14 -0400 Message-ID: <11689.1339163954@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/34 X-Sequence-Number: 39625 "Della-Croce, Gregory" 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