Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2
| От | Jorge Gustavo Rocha |
|---|---|
| Тема | Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2 |
| Дата | |
| Msg-id | 0a9fcd30-5ae2-7e5f-ac1d-60d14a2ebb63@geomaster.pt обсуждение исходный текст |
| Ответ на | Re: BUG #15827: Unable to connect on Windows using pg_services.confusing Python psycopg2 (Michael Paquier <michael@paquier.xyz>) |
| Ответы |
Re: BUG #15827: Unable to connect on Windows using pg_services.confusing Python psycopg2
|
| Список | pgsql-bugs |
Hi Michael,
Às 08:03 de 20/06/19, Michael Paquier escreveu:
On Thu, Jun 20, 2019 at 12:12:18PM +0900, Michael Paquier wrote:The discussion here is on 10, and the password file has does not enforce the flag either because it filters '\r' by itself. So another solution may be to do the same thing as what's done in passwordFromFile()?That still sounds like a good idea to do at the end. So attached is the Dr Evil's version I was thinking of, and that would be rather back-patchable. (Spoiler: not seriously tested.) Thoughts?
I've tested your patch and it works. I've just did a small test in Ubuntu and Windows using MS VSC 2019.
Your version is compiler independent, while Tom's patch was still relying on MSC fgets behavior (stripping \r if the file is opened in text mode).
Both patches works and fixes the problem, but this one is compiler independent.
If this can be back ported, it would be perfect!
Thanks for your patch.
Regards,
Jorge Gustavo
-- Michael
--
Geomaster, LDA
Geomaster, LDA VENHA DESCOBRIR O CAMINHO DO OPEN SOURCE CONNOSCO
| Avenida Barros e Soares N.º 423, 4715-214 Braga VAT/NIF 510 906 109 Phone +351 253 680 323 Site geomaster.pt GPS 41.53322, -8.41929 | Jorge Gustavo Rocha CTO Mobile +351 910 333 888 Email jgr@geomaster.pt |
Вложения
В списке pgsql-bugs по дате отправления: