<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: PostgreSQL: Script to Create a Read-Only Database User	</title>
	<atom:link href="https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Sat, 26 Jan 2019 14:24:05 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>
		By: Abhi		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-6865</link>

		<dc:creator><![CDATA[Abhi]]></dc:creator>
		<pubDate>Sat, 26 Jan 2019 14:24:05 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-6865</guid>

					<description><![CDATA[Can we grant  a user access to different databases in postgres?
If so, how to grant read only access to different databases. Thanks in advance]]></description>
			<content:encoded><![CDATA[<p>Can we grant  a user access to different databases in postgres?<br />
If so, how to grant read only access to different databases. Thanks in advance</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-6469</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 30 May 2018 19:22:58 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-6469</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-6467&quot;&gt;anupam vishwakarma&lt;/a&gt;.

Did you give the schema permission? Is foo by default created in public schema?]]></description>
			<content:encoded><![CDATA[<p>Did you give the schema permission? Is foo by default created in public schema?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: anupam vishwakarma		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-6467</link>

		<dc:creator><![CDATA[anupam vishwakarma]]></dc:creator>
		<pubDate>Wed, 30 May 2018 12:13:09 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-6467</guid>

					<description><![CDATA[Hi Anvesh,
 I followed all the steps but there is error wile accessing tables . please suggest
 psql -d postgres -Umonitor_123 -W
Password for user monitor_rplus:
psql (9.2.13, server 9.2.2)
Type &quot;help&quot; for help.

postgres=&#062; \l
                               List of databases
    Name     &#124;  Owner   &#124; Encoding &#124; Collate &#124; Ctype &#124;    Access privileges
-------------+----------+----------+---------+-------+--------------------------
 postgres    &#124; postgres &#124; LATIN1   &#124; C       &#124; C     &#124;
 database1 &#124; postgres &#124; LATIN1   &#124; C       &#124; C     &#124; =Tc/postgres            +
             &#124;          &#124;          &#124;         &#124;       &#124; postgres=CTc/postgres   +
             &#124;          &#124;          &#124;         &#124;       &#124; rplus=CTc/postgres      +
             &#124;          &#124;          &#124;         &#124;       &#124; monitor_rplus=c/postgres
 template0   &#124; postgres &#124; LATIN1   &#124; C       &#124; C     &#124; =c/postgres             +
             &#124;          &#124;          &#124;         &#124;       &#124; postgres=CTc/postgres
 template1   &#124; postgres &#124; LATIN1   &#124; C       &#124; C     &#124; =c/postgres             +
             &#124;          &#124;          &#124;         &#124;       &#124; postgres=CTc/postgres
(4 rows)

postgres=&#062; \dt
No relations found.
postgres=&#062; \c database1
Password for user monitor_123:
psql (9.2.13, server 9.2.2)
You are now connected to database &quot;revenueplus&quot; as user &quot;monitor_rplus&quot;.
revenueplus=&#062; \dt
                      List of relations
 Schema &#124;                Name                &#124; Type  &#124; Owner
--------+------------------------------------+-------+-------
 public &#124; foo                                &#124; table &#124; xxxxx

database1=&#062; select count(*) from foo;
ERROR:  permission denied for relation foo]]></description>
			<content:encoded><![CDATA[<p>Hi Anvesh,<br />
 I followed all the steps but there is error wile accessing tables . please suggest<br />
 psql -d postgres -Umonitor_123 -W<br />
Password for user monitor_rplus:<br />
psql (9.2.13, server 9.2.2)<br />
Type &#8220;help&#8221; for help.</p>
<p>postgres=&gt; \l<br />
                               List of databases<br />
    Name     |  Owner   | Encoding | Collate | Ctype |    Access privileges<br />
&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
 postgres    | postgres | LATIN1   | C       | C     |<br />
 database1 | postgres | LATIN1   | C       | C     | =Tc/postgres            +<br />
             |          |          |         |       | postgres=CTc/postgres   +<br />
             |          |          |         |       | rplus=CTc/postgres      +<br />
             |          |          |         |       | monitor_rplus=c/postgres<br />
 template0   | postgres | LATIN1   | C       | C     | =c/postgres             +<br />
             |          |          |         |       | postgres=CTc/postgres<br />
 template1   | postgres | LATIN1   | C       | C     | =c/postgres             +<br />
             |          |          |         |       | postgres=CTc/postgres<br />
(4 rows)</p>
<p>postgres=&gt; \dt<br />
No relations found.<br />
postgres=&gt; \c database1<br />
Password for user monitor_123:<br />
psql (9.2.13, server 9.2.2)<br />
You are now connected to database &#8220;revenueplus&#8221; as user &#8220;monitor_rplus&#8221;.<br />
revenueplus=&gt; \dt<br />
                      List of relations<br />
 Schema |                Name                | Type  | Owner<br />
&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;-<br />
 public | foo                                | table | xxxxx</p>
<p>database1=&gt; select count(*) from foo;<br />
ERROR:  permission denied for relation foo</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-6329</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 28 Mar 2018 19:24:36 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-6329</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-6324&quot;&gt;Pippo&lt;/a&gt;.

REVOKE CREATE ON SCHEMA public FROM public;]]></description>
			<content:encoded><![CDATA[<p>REVOKE CREATE ON SCHEMA public FROM public;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pippo		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-6324</link>

		<dc:creator><![CDATA[Pippo]]></dc:creator>
		<pubDate>Tue, 27 Mar 2018 04:37:35 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-6324</guid>

					<description><![CDATA[How do you prevent readonly user to create new tables?]]></description>
			<content:encoded><![CDATA[<p>How do you prevent readonly user to create new tables?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-4800</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 17 May 2016 04:43:47 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-4800</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-4797&quot;&gt;Ana&lt;/a&gt;.

Yes, you can set default_transaction_read_only to a particular user or group of the user.
This parameter controls the default read-only status of each new transaction. 
The default is off.]]></description>
			<content:encoded><![CDATA[<p>Yes, you can set default_transaction_read_only to a particular user or group of the user.<br />
This parameter controls the default read-only status of each new transaction.<br />
The default is off.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ana		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-4797</link>

		<dc:creator><![CDATA[Ana]]></dc:creator>
		<pubDate>Mon, 16 May 2016 21:53:40 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-4797</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-3307&quot;&gt;Michael&lt;/a&gt;.

Hi! The information provided is very helpful. 

I am having trouble forbidding not a user but a group of users from making transaction on DB. Any idea of how to that using what Michael is proposing?

Thanks in advance]]></description>
			<content:encoded><![CDATA[<p>Hi! The information provided is very helpful. </p>
<p>I am having trouble forbidding not a user but a group of users from making transaction on DB. Any idea of how to that using what Michael is proposing?</p>
<p>Thanks in advance</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-3445</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 27 Feb 2016 07:47:45 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-3445</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-3307&quot;&gt;Michael&lt;/a&gt;.

Thanks, Michael for your input.
We can also add this.]]></description>
			<content:encoded><![CDATA[<p>Thanks, Michael for your input.<br />
We can also add this.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Michael		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-create-a-read-only-database-user/#comment-3307</link>

		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Thu, 25 Feb 2016 07:32:19 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=911#comment-3307</guid>

					<description><![CDATA[Hi!
I found Your website very useful and recently I got into this particular article.
What I wanted to share is a little addition which I tried many times and which is about forbidding a user from making any transactions on the DB.
Apart from what You&#039;ve showed above, one could add

alter user  set default_transaction_read_only = on;

This little piece of code is specially useful when creating a user account to handle backup.

Once again - great job with this website!]]></description>
			<content:encoded><![CDATA[<p>Hi!<br />
I found Your website very useful and recently I got into this particular article.<br />
What I wanted to share is a little addition which I tried many times and which is about forbidding a user from making any transactions on the DB.<br />
Apart from what You&#8217;ve showed above, one could add</p>
<p>alter user  set default_transaction_read_only = on;</p>
<p>This little piece of code is specially useful when creating a user account to handle backup.</p>
<p>Once again &#8211; great job with this website!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
