The .pgpass file - Mailing list pgsql-general

From Tommy Flewwelling
Subject The .pgpass file
Date
Msg-id BAY123-W21098B61410C42DE705ADFC78A0@phx.gbl
Whole thread Raw
Responses Re: The .pgpass file  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: The .pgpass file  (Peter Eisentraut <peter_e@gmx.net>)
Re: The .pgpass file  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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!

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: md5() sorting
Next
From: "Gauthier, Dave"
Date:
Subject: Temporary, In-memory Postgres DB?