Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jgr@geomaster.pt
Cc: pgsql-bugs@lists.postgresql.org
Date: 2019-06-01T17:19:23Z
Lists: pgsql-bugs
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
Commits
-
Fix failures to ignore \r when reading Windows-style newlines.
- 8c52b77ddea7 9.4.24 landed
- 6266654db7fa 9.5.19 landed
- ba27151d1eb0 9.6.15 landed
- cb65b454f87b 10.10 landed
- 11a0a4db3cdb 11.5 landed
- c58cf97f2fc4 12.0 landed
- b654714f9bcf 13.0 landed