Hello: I noticed that I'm getting errors when copy and pasting code for stored procedure from Windows directly into psql running in putty. To reproduce create a procedure that has multiple statements with each statements having multiple lines, similar to the ones below: CREATE OR REPLACE PROCEDURE test()AS$$ UPDATE table1 SET field1 = ?;
-- more SQL statements$$LANGUAGE SQL; Copy and paste from Windows editor (or IDE) to a psql running in a Putty. Chances are it will complain of syntax error. The error doesn't appear when I copy and paste it to an empty file in vim, and the run: psql -f <file name> Is there a way of prevent this kind of error when pasting directly into psql? I'm using the latest version of PostgreSQL (server and client. Version 14.4) Thank you in advance,Ludwig Lim