Re: pgpass option is not working with hostaddr parameter - Mailing list psycopg

From Daniele Varrazzo
Subject Re: pgpass option is not working with hostaddr parameter
Date
Msg-id CA+mi_8bezvWiBJKkVQx_FwRcDZ8orJzvmcBZ-Zr9P+xDvXaPYw@mail.gmail.com
Whole thread Raw
In response to pgpass option is not working with hostaddr parameter  (Murtuza Zabuawala <m_zabuawala@yahoo.com>)
Responses Re: pgpass option is not working with hostaddr parameter  (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>)
List psycopg
On Tue, Nov 21, 2017 at 6:02 AM, Murtuza Zabuawala
<m_zabuawala@yahoo.com> wrote:
> Hi,
>
> I'm trying to connect to postgres database server v.10 using latest version
> of psycopg2(2.7.3.2) + Python3.6.
>
> The issue is that if I use pgpass parameter with host parameter in
> psycopg2's connect() method I'm able to connect to postgres server properly
> but with the same pgpass parameter (as well as pgpass file) and if I use the
> hostaddr parameter instead of host parameter I get error "No pasword
> supplied"
>
> Is it a bug with psycopg2 or libpq?

We should at least know what is in the pgpass file (not necessarily
the password, of course), and what command line you are trying to
connect as.

In principle, if you can connect with psql using the same connection
string, you can connect with psycopg as well.

If there is any bug it is in the libpq because psycopg just passes
forward the connection string. But I'm pretty sure there is no bug and
you have something wrong in your config.

-- Daniele


psycopg by date:

Previous
From: Murtuza Zabuawala
Date:
Subject: pgpass option is not working with hostaddr parameter
Next
From: Murtuza Zabuawala
Date:
Subject: Re: pgpass option is not working with hostaddr parameter