<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Postgres &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/postgres/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Tue, 17 Jul 2018 07:05:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>PostgreSQL: Script to find all Objects of a Particular User</title>
		<link>https://www.dbrnd.com/2018/09/postgresql-script-to-find-all-objects-of-a-particular-user/</link>
					<comments>https://www.dbrnd.com/2018/09/postgresql-script-to-find-all-objects-of-a-particular-user/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 03 Sep 2018 16:16:58 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[PostgreSQL DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[Database Role]]></category>
		<category><![CDATA[database user]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[pg_class]]></category>
		<category><![CDATA[pg_roles]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7708</guid>

					<description><![CDATA[In this post, I am sharing a script for getting the list of objects of a particular User (Owner of the Object) in PostgreSQL. Generally, PostgreSQL DBAs are using this kind of script for auditing purpose and object tracking purpose. Using the below script, you can get the list object for a particular user: I [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fpostgresql-script-to-find-all-objects-of-a-particular-user%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20all%20Objects%20of%20a%20Particular%20User" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fpostgresql-script-to-find-all-objects-of-a-particular-user%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20all%20Objects%20of%20a%20Particular%20User" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fpostgresql-script-to-find-all-objects-of-a-particular-user%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20all%20Objects%20of%20a%20Particular%20User" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fpostgresql-script-to-find-all-objects-of-a-particular-user%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20all%20Objects%20of%20a%20Particular%20User" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fpostgresql-script-to-find-all-objects-of-a-particular-user%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20all%20Objects%20of%20a%20Particular%20User" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fpostgresql-script-to-find-all-objects-of-a-particular-user%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20all%20Objects%20of%20a%20Particular%20User" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fpostgresql-script-to-find-all-objects-of-a-particular-user%2F&#038;title=PostgreSQL%3A%20Script%20to%20find%20all%20Objects%20of%20a%20Particular%20User" data-a2a-url="https://www.dbrnd.com/2018/09/postgresql-script-to-find-all-objects-of-a-particular-user/" data-a2a-title="PostgreSQL: Script to find all Objects of a Particular User"></a></p><p>In this post, I am sharing a script for getting the list of objects of a particular User (Owner of the Object) in PostgreSQL.<br />
Generally, PostgreSQL DBAs are using this kind of script for auditing purpose and object tracking purpose. </p>
<p>Using the below script, you can get the list object for a particular user:</p>
<p>I used a &#8216;postgres&#8217; default user in WHERE condition, which you can edit as per your user.</p>
<pre class="crayon-plain-tag">select 
    nsp.nspname as SchemaName
    ,cls.relname as ObjectName 
    ,rol.rolname as ObjectOwner
    ,case cls.relkind
        when 'r' then 'TABLE'
        when 'm' then 'MATERIALIZED_VIEW'
        when 'i' then 'INDEX'
        when 'S' then 'SEQUENCE'
        when 'v' then 'VIEW'
        when 'c' then 'TYPE'
        else cls.relkind::text
    end as ObjectType
from pg_class cls
join pg_roles rol 
	on rol.oid = cls.relowner
join pg_namespace nsp 
	on nsp.oid = cls.relnamespace
where nsp.nspname not in ('information_schema', 'pg_catalog')
    and nsp.nspname not like 'pg_toast%'
    and rol.rolname = 'postgres'  
order by nsp.nspname, cls.relname</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/09/postgresql-script-to-find-all-objects-of-a-particular-user/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>PostgreSQL Error &#8211; FATAL: database role &#8220;root&#8221; does not exist in Linux</title>
		<link>https://www.dbrnd.com/2017/01/postgresql-error-fatal-database-role-root-does-not-exist-in-linux/</link>
					<comments>https://www.dbrnd.com/2017/01/postgresql-error-fatal-database-role-root-does-not-exist-in-linux/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 23 Jan 2017 21:21:42 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[fatal]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[login fail]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[role]]></category>
		<category><![CDATA[role does not exist]]></category>
		<category><![CDATA[username]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4105</guid>

					<description><![CDATA[A PostgreSQL Fatal error like role or username does not exist. This is a very common error which is facing by PostgreSQL Users. Actually, this is happening because of misconfiguration of System username and Database Username. Most of the Linux users are trying to log in PostgreSQL using root user. But actually, this is wrong. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-error-fatal-database-role-root-does-not-exist-in-linux%2F&amp;linkname=PostgreSQL%20Error%20%E2%80%93%20FATAL%3A%20database%20role%20%E2%80%9Croot%E2%80%9D%20does%20not%20exist%20in%20Linux" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-error-fatal-database-role-root-does-not-exist-in-linux%2F&amp;linkname=PostgreSQL%20Error%20%E2%80%93%20FATAL%3A%20database%20role%20%E2%80%9Croot%E2%80%9D%20does%20not%20exist%20in%20Linux" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-error-fatal-database-role-root-does-not-exist-in-linux%2F&amp;linkname=PostgreSQL%20Error%20%E2%80%93%20FATAL%3A%20database%20role%20%E2%80%9Croot%E2%80%9D%20does%20not%20exist%20in%20Linux" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-error-fatal-database-role-root-does-not-exist-in-linux%2F&amp;linkname=PostgreSQL%20Error%20%E2%80%93%20FATAL%3A%20database%20role%20%E2%80%9Croot%E2%80%9D%20does%20not%20exist%20in%20Linux" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-error-fatal-database-role-root-does-not-exist-in-linux%2F&amp;linkname=PostgreSQL%20Error%20%E2%80%93%20FATAL%3A%20database%20role%20%E2%80%9Croot%E2%80%9D%20does%20not%20exist%20in%20Linux" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-error-fatal-database-role-root-does-not-exist-in-linux%2F&amp;linkname=PostgreSQL%20Error%20%E2%80%93%20FATAL%3A%20database%20role%20%E2%80%9Croot%E2%80%9D%20does%20not%20exist%20in%20Linux" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-error-fatal-database-role-root-does-not-exist-in-linux%2F&#038;title=PostgreSQL%20Error%20%E2%80%93%20FATAL%3A%20database%20role%20%E2%80%9Croot%E2%80%9D%20does%20not%20exist%20in%20Linux" data-a2a-url="https://www.dbrnd.com/2017/01/postgresql-error-fatal-database-role-root-does-not-exist-in-linux/" data-a2a-title="PostgreSQL Error – FATAL: database role “root” does not exist in Linux"></a></p><p>A PostgreSQL Fatal error like role or username does not exist. This is a very common error which is facing by PostgreSQL Users.</p>
<blockquote><p>Actually, this is happening because of misconfiguration of System username and Database Username.
</p></blockquote>
<blockquote><p>Most of the Linux users are trying to log in PostgreSQL using root user. But actually, this is wrong. </p></blockquote>
<blockquote><p>You will need to become the operating system user under which PostgreSQL was installed to create the first user account.</p></blockquote>
<blockquote><p>Generally, the default user name is Postgres and default database is also Postgres.<br />
Once you install PostgreSQL on Linux, you should set the password for the Postgres user which is the default super user of PostgreSQL. </p></blockquote>
<blockquote><p>Please do not try to log in with any other default Linux or Unix system user name.
</p></blockquote>
<p><strong>Set password for the default Postgres user:<br />
</strong></p>
<pre class="crayon-plain-tag">sudo passwd postgres</pre> </p>
<p><strong>Create another role using &#8220;postgres&#8221;:<br />
</strong>Creating new role &#8220;dbrnd&#8221;. -p = set the password and -d = allow to create database.</p>
<pre class="crayon-plain-tag">sudo -u postgres createuser dbrnd -d -P</pre> </p>
<blockquote class="wp-embedded-content" data-secret="zQcnw6C0WT"><p><a href="https://www.dbrnd.com/2016/04/postgresql-how-to-install-postgresql-9-4-on-ubuntu-14-04/">PostgreSQL: How to Install PostgreSQL 9.4 on Ubuntu 14.04?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/postgresql-how-to-install-postgresql-9-4-on-ubuntu-14-04/embed/#?secret=zQcnw6C0WT" data-secret="zQcnw6C0WT" width="600" height="338" title="&#8220;PostgreSQL: How to Install PostgreSQL 9.4 on Ubuntu 14.04?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote class="wp-embedded-content" data-secret="ViFF2aw9xL"><p><a href="https://www.dbrnd.com/2017/01/postgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04/">PostgreSQL: How to Install PostgreSQL 9.6 on Ubuntu 16.04?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2017/01/postgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04/embed/#?secret=ViFF2aw9xL" data-secret="ViFF2aw9xL" width="600" height="338" title="&#8220;PostgreSQL: How to Install PostgreSQL 9.6 on Ubuntu 16.04?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2017/01/postgresql-error-fatal-database-role-root-does-not-exist-in-linux/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>PostgreSQL: How to Install PostgreSQL 9.6 on Ubuntu 16.04?</title>
		<link>https://www.dbrnd.com/2017/01/postgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04/</link>
					<comments>https://www.dbrnd.com/2017/01/postgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 15 Jan 2017 12:19:45 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[PostgreSQL DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL 9.6]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[psql]]></category>
		<category><![CDATA[su postgres]]></category>
		<category><![CDATA[Ubuntu 16.04]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4326</guid>

					<description><![CDATA[&#160; PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. &#160; I am going to share few steps to install PostgreSQL 9.6 on Ubuntu 16.04. First, check the version [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Install%20PostgreSQL%209.6%20on%20Ubuntu%2016.04%3F" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Install%20PostgreSQL%209.6%20on%20Ubuntu%2016.04%3F" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Install%20PostgreSQL%209.6%20on%20Ubuntu%2016.04%3F" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Install%20PostgreSQL%209.6%20on%20Ubuntu%2016.04%3F" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Install%20PostgreSQL%209.6%20on%20Ubuntu%2016.04%3F" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Install%20PostgreSQL%209.6%20on%20Ubuntu%2016.04%3F" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04%2F&#038;title=PostgreSQL%3A%20How%20to%20Install%20PostgreSQL%209.6%20on%20Ubuntu%2016.04%3F" data-a2a-url="https://www.dbrnd.com/2017/01/postgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04/" data-a2a-title="PostgreSQL: How to Install PostgreSQL 9.6 on Ubuntu 16.04?"></a></p><p><a href="https://www.dbrnd.com/wp-content/uploads/2016/04/elephant-kruger.jpg" rel="attachment wp-att-2263"><img fetchpriority="high" decoding="async" class="alignleft wp-image-2263 size-medium" title="PostgreSQL Elephant" src="https://www.dbrnd.com/wp-content/uploads/2016/04/elephant-kruger-300x218.jpg" alt="PostgreSQL Elephant" width="300" height="218" srcset="https://www.dbrnd.com/wp-content/uploads/2016/04/elephant-kruger-300x218.jpg 300w, https://www.dbrnd.com/wp-content/uploads/2016/04/elephant-kruger-150x109.jpg 150w, https://www.dbrnd.com/wp-content/uploads/2016/04/elephant-kruger.jpg 622w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>&nbsp;</p>
<p><em><a href="http://www.postgresql.org/about/" target="_blank">PostgreSQL is a powerful,</a> open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.</em><br />
&nbsp;<br />
I am going to share few steps to install PostgreSQL 9.6 on Ubuntu 16.04.</p>
<p><strong>First, check the version of Ubuntu:</strong><br />
<pre class="crayon-plain-tag">lsb_release -sc</pre>
<strong>You need to add the latest PostgreSQL repository for the latest version, otherwise It will install old version. This is for trusty version.</strong><br />
<pre class="crayon-plain-tag">sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"</pre>
<strong>Update and Install PostgreSQL 9.6:</strong><br />
<pre class="crayon-plain-tag">sudo apt-get update
sudo apt-get install postgresql-9.6</pre>
<strong>Default postgres super user and postgres database is created. You need to set a password for the postgres super user. </strong><br />
<pre class="crayon-plain-tag">ubuntu@:~$ sudo passwd postgres
Enter new UNIX password:****
Retype new UNIX password:****
passwd: password updated successfully</pre>
<strong>If service is not started, you can start the PostgreSQL service. </strong><br />
<pre class="crayon-plain-tag">sudo service postgresql start</pre>
<strong>Connect PostgreSQL server using postgres user:</strong><br />
<pre class="crayon-plain-tag">ubuntu@:~$ su postgres
Password:****</pre>
<strong>Create a sample database:</strong><br />
<pre class="crayon-plain-tag">createdb database_name</pre>
<strong>Connect to that database:</strong><br />
<pre class="crayon-plain-tag">psql -d database_name</pre>
<strong>Create a sample table:</strong><br />
<pre class="crayon-plain-tag">create table Test (rno integer);</pre>
<strong>Exit to database session:</strong><br />
<pre class="crayon-plain-tag">\q</pre>
<strong>Exit to PostgreSQL server:</strong><br />
<pre class="crayon-plain-tag">exit</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2017/01/postgresql-how-to-install-postgresql-9-6-on-ubuntu-16-04/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to reset postgres user password in windows ?</title>
		<link>https://www.dbrnd.com/2015/05/how-to-reset-postgres-user-password-in/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 20 May 2015 13:46:18 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[pgpass file.]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=138</guid>

					<description><![CDATA[Guys, Can you believe that PostgreSQL store it&#8217;s postgres super user password into plain text. Wow, If it is in plain text, it&#8217;s very easy to change. The solution for the windows postgres user is , to change content of pgpass.conf file. How ? I read an official document of PostgreSQL and found postgres storing [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fhow-to-reset-postgres-user-password-in%2F&amp;linkname=How%20to%20reset%20postgres%20user%20password%20in%20windows%20%3F" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fhow-to-reset-postgres-user-password-in%2F&amp;linkname=How%20to%20reset%20postgres%20user%20password%20in%20windows%20%3F" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fhow-to-reset-postgres-user-password-in%2F&amp;linkname=How%20to%20reset%20postgres%20user%20password%20in%20windows%20%3F" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fhow-to-reset-postgres-user-password-in%2F&amp;linkname=How%20to%20reset%20postgres%20user%20password%20in%20windows%20%3F" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fhow-to-reset-postgres-user-password-in%2F&amp;linkname=How%20to%20reset%20postgres%20user%20password%20in%20windows%20%3F" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fhow-to-reset-postgres-user-password-in%2F&amp;linkname=How%20to%20reset%20postgres%20user%20password%20in%20windows%20%3F" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fhow-to-reset-postgres-user-password-in%2F&#038;title=How%20to%20reset%20postgres%20user%20password%20in%20windows%20%3F" data-a2a-url="https://www.dbrnd.com/2015/05/how-to-reset-postgres-user-password-in/" data-a2a-title="How to reset postgres user password in windows ?"></a></p><p>Guys, Can you believe that PostgreSQL store it&#8217;s postgres super user password into plain text.</p>
<p>Wow, If it is in plain text, it&#8217;s very easy to change.</p>
<p>The solution for the windows postgres user is , to change content of pgpass.conf file.</p>
<p>How ?</p>
<p>I read an official document of PostgreSQL and found postgres storing all passwords as a plain text into pgpass.conf.</p>
<p>Now time to search this file in our windows storage directory.</p>
<p><b><span style="font-size: xx-large;">I found this file in : </span></b></p>
<p><b><span style="color: #ff0000; font-size: xx-large;">C:\Document and  Settings\..\Application Data\postgresql\pgpass.conf</span></b></p>
<ul>
<li><b><span style="font-size: x-large;">You can find your postgres super user password in this file.</span></b></li>
<li><b><span style="font-size: x-large;">If you find blank file then please write your new password in this file and this password will work for postgres super user</span></b></li>
</ul>
<p><span style="color: #ff0000; font-size: x-large;"><b>Please note, this password is only for client side location after reset this you can connect your pgadmin tool.</b></span></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
