Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2
Дата
Msg-id CA+mi_8aBnLKypX2Ttksg8JEhApBo=JpF6P_STQGp-FOvDpn6Yw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2  (Jorge Gustavo Rocha <jgr@geomaster.pt>)
Ответы Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2  (Jorge Gustavo Rocha <jgr@geomaster.pt>)
Список pgsql-bugs
On Tue, Jun 18, 2019 at 3:43 PM Jorge Gustavo Rocha <jgr@geomaster.pt> wrote:
 
psycopg2.OperationalError: could not translate host name "192.168.1.24
" to address: Unknown host

You can see replies related to the '\r' issue.
1) https://github.com/qgis/QGIS/issues/30027#issuecomment-497433789
2) https://github.com/qgis/QGIS/issues/30027#issuecomment-498690261
3) https://github.com/qgis/QGIS/issues/30027#issuecomment-498700090
4) https://github.com/qgis/QGIS/issues/30027#issuecomment-501799219
I didn't invented the '\r' problem. I've just jumped into it.

I didn't found any other issue with line endings problems in Postgresql. Maybe other '\r' are not harmful. But these in front of host names or host addresses are critical to resolve the ip addresses.

But, for the sake of clarity, the summary is this:

Installing QGIS, in Windows, with libpq, if the pg_services.conf file has '\r\n' line endings, the pg_services fails.

Installing QGIS, in Windows, with libpq, if the pg_services.conf file only has '\n' line endings, the pg_services rocks!
In all likelyhood, if you are using psycopg on windows, you are using a libpq compiled for the client, not the libpq shipped with postgres server for windows.

Compiling the libpq happens in this script:


you can verify if the right compiler and libraries are used, or things are used in a way that '\r' is not handled correctly.

-- Daniele

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Jorge Gustavo Rocha
Дата:
Сообщение: Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15859: Postgres 11 repository is missing extensions