Re: .pgpass being ignored

Adrian Klaver <adrian.klaver@gmail.com>

From: Adrian Klaver <adrian.klaver@gmail.com>
To: Frank Broniewski <brfr@metrico.lu>
Cc: pgsql-general@postgresql.org
Date: 2013-06-25T13:37:54Z
Lists: pgsql-general
On 06/24/2013 11:36 PM, Frank Broniewski wrote:
>>>          However, when I call createdb, it fails:
>>>
>>>               $ createdb -h 192.168.1.4 -U postgres --no-password
>>> JobSearch
>>>               createdb: could not connect to database postgres:
>>>          fe_sendauth: no
>>>          password supplied
>>>
>
> Hi,
>
> isn't your --no-password switch preventing this? I never use this switch
> and my .pgpass is used by shell scripts and other programs ...

http://www.postgresql.org/docs/9.2/interactive/app-createdb.html

-w
--no-password
Never issue a password prompt. If the server requires password 
authentication and a password is not available by other means such as a 
.pgpass file, the connection attempt will fail. This option can be 
useful in batch jobs and scripts where no user is present to enter a 
password.



>
>
> Frank
>
>


-- 
Adrian Klaver
adrian.klaver@gmail.com