<?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: Creating New Accounts in&#160;PostgreSQL</title>
	<atom:link href="http://hocuspokus.net/2007/11/creating-new-accounts-in-postgresql/feed" rel="self" type="application/rss+xml" />
	<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL</link>
	<description>the life and times of a code monkey</description>
	<lastBuildDate>Thu, 11 Mar 2010 10:11:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: aihtdikh</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-922</link>
		<dc:creator>aihtdikh</dc:creator>
		<pubDate>Tue, 26 May 2009 07:46:59 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-922</guid>
		<description>&lt;p&gt;I know this is a bit late, but...
The &quot;ERROR: database &quot;postgres&quot; already exists&quot; problem is caused by missing quotes.
su wants the command and its arguments to be passed in as one argument.
So
sudo su postgres -c &quot;createdb blah&quot;
will create a database called blah.
sudo su postgres -c createdb blah    (no quotes)
seems to be using the default db - which is the same as the username.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I know this is a bit late, but&#8230;
The &#8220;ERROR: database &#8220;postgres&#8221; already exists&#8221; problem is caused by missing quotes.
su wants the command and its arguments to be passed in as one argument.
So
sudo su postgres -c &#8220;createdb blah&#8221;
will create a database called blah.
sudo su postgres -c createdb blah    (no quotes)
seems to be using the default db - which is the same as the username.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ashesh</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-418</link>
		<dc:creator>Ashesh</dc:creator>
		<pubDate>Fri, 15 Aug 2008 16:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-418</guid>
		<description>&lt;p&gt;Great post! Was very helpful to me!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great post! Was very helpful to me!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: lautaro</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-184</link>
		<dc:creator>lautaro</dc:creator>
		<pubDate>Fri, 07 Mar 2008 20:59:23 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-184</guid>
		<description>&lt;p&gt;Hi Daz, you can also do:&lt;/p&gt;

&lt;p&gt;$ sudo su postgres -c psql
postgres=# CREATE USER daz WITH PASSWORD &#039;mypassword&#039;;
postgres=# \q&lt;/p&gt;

&lt;p&gt;Instead &quot;ALTER&quot;, supposing  &quot;sudo su postgres -c createuser daz&quot; wasn&#039;t executed.&lt;/p&gt;

&lt;p&gt;Thanks, and nice blog.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Daz, you can also do:</p>

<p>$ sudo su postgres -c psql
postgres=# CREATE USER daz WITH PASSWORD &#8216;mypassword&#8217;;
postgres=# \q</p>

<p>Instead &#8220;ALTER&#8221;, supposing  &#8220;sudo su postgres -c createuser daz&#8221; wasn&#8217;t executed.</p>

<p>Thanks, and nice blog.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-174</link>
		<dc:creator>Douglas</dc:creator>
		<pubDate>Tue, 26 Feb 2008 16:50:10 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-174</guid>
		<description>&lt;p&gt;Strangely, was having the same problem and also the problem that it would not take my password when I tried no sign on.
Newbies answer worked for me and made the database and now I can sign on.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Strangely, was having the same problem and also the problem that it would not take my password when I tried no sign on.
Newbies answer worked for me and made the database and now I can sign on.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Newbie</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-143</link>
		<dc:creator>Newbie</dc:creator>
		<pubDate>Mon, 07 Jan 2008 12:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-143</guid>
		<description>&lt;p&gt;$ sudo su postgres -c createdb xyz â€¦ and got the error&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;createdb: database creation failed: ERROR: database â€œpostgresâ€ already exists
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Gave me exactly the same error message so I separated the steps :&lt;/p&gt;

&lt;p&gt;user01~$ sudo su postgres
postgres~$ createdb xyz
CREATE DATABASE
postgres~$ exit
user01~$&lt;/p&gt;

&lt;p&gt;Worked for me :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>$ sudo su postgres -c createdb xyz â€¦ and got the error</p>

<pre><code>createdb: database creation failed: ERROR: database â€œpostgresâ€ already exists
</code></pre>

<p>Gave me exactly the same error message so I separated the steps :</p>

<p>user01~$ sudo su postgres
postgres~$ createdb xyz
CREATE DATABASE
postgres~$ exit
user01~$</p>

<p>Worked for me <img src='http://hocuspokus.net/wp-content/plugins/smilies-themer/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Setup PostgreSQL Database server in Ubuntu &#171; Going GNU</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-140</link>
		<dc:creator>Setup PostgreSQL Database server in Ubuntu &#171; Going GNU</dc:creator>
		<pubDate>Sun, 30 Dec 2007 09:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-140</guid>
		<description>&lt;p&gt;[...] Add new users. http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/ [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Add new users. <a href="http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/" >http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/</a> [&#8230;]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Newkidontheblock</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-42</link>
		<dc:creator>Newkidontheblock</dc:creator>
		<pubDate>Sat, 24 Nov 2007 03:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-42</guid>
		<description>&lt;p&gt;Hi,
No...I did &lt;code&gt;$ sudo su postgres -c createdb xyz&lt;/code&gt; ... and got the error&lt;/p&gt;

&lt;blockquote&gt;createdb: database creation failed: ERROR: database â€œpostgresâ€ already exists&lt;/blockquote&gt;

&lt;p&gt;then I changed to the su user I already created ... and I did&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo su newkid -c createdb xyz&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and I still got the same error:&lt;/p&gt;

&lt;blockquote&gt;ERROR: database â€œpostgresâ€ already exists.&lt;/blockquote&gt;

&lt;p&gt;I however Installed phppgadmin and logged in as the newkid user then created the database xyz from there and it worked.&lt;/p&gt;

&lt;p&gt;i don&#039;t know why it won&#039;t do it from the command line.&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,
No&#8230;I did <code>$ sudo su postgres -c createdb xyz</code> &#8230; and got the error</p>

<blockquote>createdb: database creation failed: ERROR: database â€œpostgresâ€ already exists</blockquote>

<p>then I changed to the su user I already created &#8230; and I did</p>

<p><code>$ sudo su newkid -c createdb xyz</code></p>

<p>and I still got the same error:</p>

<blockquote>ERROR: database â€œpostgresâ€ already exists.</blockquote>

<p>I however Installed phppgadmin and logged in as the newkid user then created the database xyz from there and it worked.</p>

<p>i don&#8217;t know why it won&#8217;t do it from the command line.</p>

<p>Cheers</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Daz</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-39</link>
		<dc:creator>Daz</dc:creator>
		<pubDate>Thu, 22 Nov 2007 16:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-39</guid>
		<description>&lt;p&gt;Hi ya,&lt;/p&gt;

&lt;p&gt;Right, need to check a couple of things first...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are running this command as your user aren&#039;t you, not the &#039;postgres&#039; user?&lt;/li&gt;
&lt;li&gt;Your user account does have root priveleges?&lt;/li&gt;
&lt;li&gt;Are you running this command: &lt;code&gt;$ sudo su postgres -c createdb postgres&lt;/code&gt;?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If it is the last one (as the error message you are getting suggests this), you are trying to create a database that already exists - you don&#039;t need to create a database for the postgres user as there is one created by default upon install.  You only need to create a database for other users that you create.&lt;/p&gt;

&lt;p&gt;Let me know if you&#039;re still having troubles.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi ya,</p>

<p>Right, need to check a couple of things first&#8230;</p>

<ul>
<li>You are running this command as your user aren&#8217;t you, not the &#8216;postgres&#8217; user?</li>
<li>Your user account does have root priveleges?</li>
<li>Are you running this command: <code>$ sudo su postgres -c createdb postgres</code>?</li>
</ul>

<p>If it is the last one (as the error message you are getting suggests this), you are trying to create a database that already exists - you don&#8217;t need to create a database for the postgres user as there is one created by default upon install.  You only need to create a database for other users that you create.</p>

<p>Let me know if you&#8217;re still having troubles.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Newkidontheblock</title>
		<link>http://hocuspokus.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fhocuspokus.net%2F2007%2F11%2Fcreating-new-accounts-in-postgresql&amp;seed_title=Creating+New+Accounts+in%26%23160%3BPostgreSQL/comment-page-1#comment-37</link>
		<dc:creator>Newkidontheblock</dc:creator>
		<pubDate>Thu, 22 Nov 2007 16:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://hocuspokus.net/2007/11/05/creating-new-accounts-in-postgresql/#comment-37</guid>
		<description>&lt;p&gt;Hi Darren,&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo su postgres -c createdb daz &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This did not work for me....I&#039;ve been having this problem since and beginning to think postgresql is a pain }:)&lt;/p&gt;

&lt;p&gt;it came up with this error&lt;/p&gt;

&lt;blockquote&gt;createdb: database creation failed: ERROR:  database &quot;postgres&quot; already exists&lt;/blockquote&gt;

&lt;p&gt;can you help ..I need to get this right..cheers&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Darren,</p>

<p><code>sudo su postgres -c createdb daz </code></p>

<p>This did not work for me&#8230;.I&#8217;ve been having this problem since and beginning to think postgresql is a pain }:)</p>

<p>it came up with this error</p>

<blockquote>createdb: database creation failed: ERROR:  database &#8220;postgres&#8221; already exists</blockquote>

<p>can you help ..I need to get this right..cheers</p>]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->