From: | "okano(dot)naoki(at)fujitsu(dot)com" <okano(dot)naoki(at)fujitsu(dot)com> |
---|---|
To: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | CR is not removed with psql -f command on Windows. |
Date: | 2021-05-27 09:09:52 |
Message-ID: | OS0PR01MB57622824690A0E18AB46CBE4FF239@OS0PR01MB5762.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi,
I am using Windows OS.
When creating a function with the psql -f filename command, the prosrc in pg_proc catalog contains \r(CR).
But I expect \r to be deleted. Is this a bug?
# If I use the psql < test.sql command, the prosrc in pg_proc catalog does not contain \r(CR).
[Environment]
* Windows 10
* PostgreSQL 13.3, compiled by Visual C + build 1914, 64 bit
[Reproduction]
(1) Create test.sql describing the following (The newline is CRLF)
CREATE OR REPLACE FUNCTION test_func(i integer) RETURNS integer AS $$
BEGIN
RETURN i + 1;
END;
$$ LANGUAGE plpgsql;
(2) psql -f test.sql
(3) psql -c "SELECT proname, prosrc FROM pg_proc WHERE proname = 'test_func';"
The result of (3) above contains \r in the prosrc in pg_proc.
proname | prosrc
-----------+---------------------
test_func | \r +
| BEGIN\r +
| RETURN i + 1;\r+
| END;\r +
I found a similar bug report below.
Is it related to this problem?
* https://www.postgresql.org/message-id/flat/20201028204654.GD3239%40momjian.us#1b2a2672d66aa6f10225a24c320b434c
Regards,
Naoki, Okano
From | Date | Subject | |
---|---|---|---|
Next Message | 德哥 | 2021-05-27 09:21:34 | Re:Re: BUG #17036: generated column cann't modifyed auto when update |
Previous Message | David Rowley | 2021-05-27 06:48:37 | Re: BUG #17034: Creating aggregate function based on array_append now results in "function does not exist" error |