Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hX7fK-0002pD-7T for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Jun 2019 17:19:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hX7fI-00020m-Qa for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Jun 2019 17:19:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hX7fI-0001xy-E7 for pgsql-bugs@lists.postgresql.org; Sat, 01 Jun 2019 17:19:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hX7fG-0005og-3M for pgsql-bugs@lists.postgresql.org; Sat, 01 Jun 2019 17:19:31 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x51HJNjF019008; Sat, 1 Jun 2019 13:19:24 -0400 From: Tom Lane To: jgr@geomaster.pt cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2 In-reply-to: <15827-e6ba53a3a7ed543c@postgresql.org> References: <15827-e6ba53a3a7ed543c@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 31 May 2019 15:57:40 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <82490.1559409563.1@sss.pgh.pa.us> Date: Sat, 01 Jun 2019 13:19:23 -0400 Message-ID: <82491.1559409563@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form 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