Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmGUf-0007Jr-1b for pgsql-bugs@arkaria.postgresql.org; Thu, 27 May 2021 13:56:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lmGUd-00049c-KY for pgsql-bugs@arkaria.postgresql.org; Thu, 27 May 2021 13:56:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmGUd-00049U-Dp for pgsql-bugs@lists.postgresql.org; Thu, 27 May 2021 13:56:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmGUb-0004Ne-Ak for pgsql-bugs@lists.postgresql.org; Thu, 27 May 2021 13:56:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 14RDu5ul1710294; Thu, 27 May 2021 09:56:05 -0400 From: Tom Lane To: "okano.naoki@fujitsu.com" cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: CR is not removed with psql -f command on Windows. In-reply-to: References: Comments: In-reply-to "okano.naoki@fujitsu.com" message dated "Thu, 27 May 2021 09:09:52 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1710292.1622123765.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 27 May 2021 09:56:05 -0400 Message-ID: <1710293.1622123765@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "okano.naoki@fujitsu.com" writes: > When creating a function with the psql -f filename command, the prosrc i= n pg_proc catalog contains \r(CR). Does that cause you any actual problems? > But I expect \r to be deleted. Is this a bug? I'm kind of inclined to ignore it, mainly because of the law of unintended consequences: adding code to strip \r is likely to break some scenario that's working fine for somebody else. I see that psql opens -f files with PG_BINARY_R, but that seems to be a very ancient decision so I'm hesitant to change it. regards, tom lane