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
|
Список | 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-4974337892) https://github.com/qgis/QGIS/issues/30027#issuecomment-4986902613) https://github.com/qgis/QGIS/issues/30027#issuecomment-4987000904) https://github.com/qgis/QGIS/issues/30027#issuecomment-501799219I 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 по дате отправления: