From: Jorge Gustavo Rocha <jgr@geomaster.pt>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2
Date: Sat, 1 Jun 2019 18:58:31 +0100
Message-ID: <f18451cf-0084-661a-a9cb-fd818ec4609b@geomaster.pt> (raw)
In-Reply-To: <82491.1559409563@sss.pgh.pa.us>
References: <15827-e6ba53a3a7ed543c@postgresql.org>
<82491.1559409563@sss.pgh.pa.us>
Hi Tom,
Thanks for looking at this.
I've tried with \n and \r\n separators to make sure it wasn't the
problem. I did a od -c to make sure the endings were the expected ones,
and I found no difference between just \n or \r\n.
The psql is able to deal with service=pg_trabalho, so I think libpq is
reading the file without line end issues.
I was able to get it run on another Windows (on a virtual machine I've
installed).
Right now, I suspected that the problem might be even upstream, when
libpq tries to use/resolve the address. I have to return to the network
where the problem was reported (a large intranet) and test it in the
original environment.
Regards,
Jorge Gustavo
Às 18:19 de 01/06/19, Tom Lane escreveu:
> PG Bug reporting form <noreply@postgresql.org> writes:
>> I'm using `pg_services.conf` to provide access to a Postgresql database.
>> ...
>> From other's feedback, I've tried to use the line separators in
>> pg_services.conf with \n and \r\n, but the result is the same (because there
>> is strange newline after the host address).
>
> Hm, can you double check that? It sure looks like something is failing to
> remove the "\r" from that line of pg_service.conf. Which is odd, because
> libpq opens the file in text mode so the Windows C library ought to take
> care of reducing "\r\n" to "\n".
>
> It seems like in general, maybe we ought to trim trailing spaces from
> pg_service.conf entries automatically. But I'm not entirely sure if
> that would fix this problem...
>
> regards, tom lane
>
>
--
Logo* Geomaster, LDA*
*VENHA DESCOBRIR O CAMINHO DO OPEN SOURCE CONNOSC**O
*
Avenida Barros e Soares
N.º 423, 4715-214 Braga
VAT/NIF510 906 109
Phone +351 253 680 323
Site geomaster.pt <http://geomaster.pt;
GPS 41.53322, -8.41929
------------------------------------------------------------------------
Jorge Gustavo Rocha
CTO
Mobile +351 910 333 888
Email jgr@geomaster.pt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: jgr@geomaster.pt, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2
In-Reply-To: <f18451cf-0084-661a-a9cb-fd818ec4609b@geomaster.pt>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox