<?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>Learning is an Art &#187; pgpass.conf</title>
	<atom:link href="http://www.singhvishwajeet.com/tag/pgpass-conf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.singhvishwajeet.com</link>
	<description>My experiences</description>
	<lastBuildDate>Sun, 24 Jul 2011 18:03:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>PostgresSQL passing password from command line solution</title>
		<link>http://www.singhvishwajeet.com/2009/12/13/postgressql-passing-password-from-commandline-solution/</link>
		<comments>http://www.singhvishwajeet.com/2009/12/13/postgressql-passing-password-from-commandline-solution/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 17:42:09 +0000</pubDate>
		<dc:creator>Vishwajeet Singh</dc:creator>
				<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[pgpass.conf]]></category>
		<category><![CDATA[PGPASSWORD]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.singhvishwajeet.com/?p=262</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>Few days back I was trying to create database in a batch job using createdb.exe and I encountered this problem createdb.exe prompts for password and there is no way of passing password from command line as an argument.<br />
I tried to find out how to do this but in vein there is no way you can pass password as an command line argument; than after looking around for sometime and googling I found two ways of doing it</p>
<ul>
<li><strong>Setting up PGPASSWORD environment variable</strong> : This method is not preferable as it&#8217;s insecure more for further details read <a title="Postgres Environment variables" href="http://www.postgresql.org/docs/8.3/static/libpq-envars.html" target="_blank">this</a></li>
</ul>
<p><br/></p>
<ul>
<li><strong>Setting up password in pgpass.conf</strong> : The file is to be located
<div class="codesnip-container" >%APPDATA%\postgresql\pgpass.conf</div>
</li>
</ul>
<p>File has the following format</p>
<div class="codesnip-container" >hostname:port:database:username:password</div>
<p>Each of the first four fields may be a literal value, or *, which matches anything.</p>
<p>For further details the postgres <a title="Postgres password file" href="http://www.pgadmin.org/docs/1.4/pg/libpq-pgpass.html" target="_blank">documentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.singhvishwajeet.com/2009/12/13/postgressql-passing-password-from-commandline-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

