The .pgpass file

From: Tommy Flewwelling <tommyflewwelling(at)hotmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: The .pgpass file
Date: 2007-11-07 14:59:42
Message-ID: BAY123-W21098B61410C42DE705ADFC78A0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

How do I specify in the command-line to access the .pgpass file when creating a database?

I would like to use ~/.pgpass instead of –W on the command line when creating a database (createdb) and was wondering the correct syntax.

For example,

I don’t want to have to include (-W):
C:\postgressql\bin>createdb -U postgres –p 5432 -W –E UTF8 myDatabase


and substitute it for ~/.pgpass or PGPASSFILE:

C:\postgressql\bin>createdb -U postgres –p 5432 ~/.pgpass –E UTF8 myDatabase


How do I inform the complier to extract the password from the file and not the prompt the user?

Any suggestions would be greatly appreciated.

Tommy_
_________________________________________________________________
R U Ready for Windows Live Messenger Beta 8.5? Try it today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2007-11-07 15:03:24 Temporary, In-memory Postgres DB?
Previous Message Martijn van Oosterhout 2007-11-07 14:54:02 Re: md5() sorting