Search Postgresql Archives

Re: The .pgpass file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tommy Flewwelling wrote:
> 
> Hello, 
>  
> How do I specify in the command-line to access the .pgpass file when
> creating a database?

You don't.  If the file exists and has the correct permission, createdb
will read it.  If the needed password is found, the connection will be
done without ever prompting the user.

FWIW the -W switch is useless.  If createdb finds that the password is
needed, it will prompt the user even if -W is not specified.  If
createdb finds that the password is not needed, then it won't prompt the
user.

(Note that none of this is actually createdb's feature.  It is all done
by libpq internally.)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux