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 1o9lQF-0003If-HM for pgsql-general@arkaria.postgresql.org; Fri, 08 Jul 2022 10:41:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o9lQE-0001Fj-Ce for pgsql-general@arkaria.postgresql.org; Fri, 08 Jul 2022 10:41:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o944d-0008Gk-2S for pgsql-general@lists.postgresql.org; Wed, 06 Jul 2022 12:24:07 +0000 Received: from sonic311-23.consmr.mail.gq1.yahoo.com ([98.137.65.204]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o944a-0001A1-8A for pgsql-general@postgresql.org; Wed, 06 Jul 2022 12:24:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657110242; bh=ZOyLTJM2rPbNWFKQuYPtRnakwe97N9ElIQh3mwzYBhk=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=pt0HkBz9srM8qdWjonGVyMEThBvmqcGZVILGLbmnboeeawcewQkA06thv1rg8lYLHacFGvhXSood2Hq8LKQIgiff6zvnaCgP2XAS0Mixu9ZnUecQ8nJckhk/DZtxQwyQ2M8HPTnqkbVVqaZCp+NimP6kwnrTE+r6NXtN50gOG5rv4KAS3yZRXYVhZyBIsBZ36A1gpyEz7iNEv3J8LFQMotZ3ldbyMrR06VNP7eYTtXEB08fPtIuBmyoa8gURKv3iQui8BWDPhWe2u05zrs/hHkSiyngLgTBLTp3qcx4JtrFOg9ltc8swEaum5yz2r7ciPUUElWo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0FIUtXN4fMFQHEHUzo3nMKRY6GWss4vsuR0i0ir 7grISfJi6fMJAYWYz3nDGpbVdrfueoUasdEeZLfXkMfNYc0YHUt.I3ucYMcp14oShAGxXFdLqwkk MtuJl0tQ3rG27cgkAbFGSnKAvj1g17r77W65QuYQBoyzW0kq73MjmgqDFSrgzlRBU6Ggdkrez4on myLNRa60XXEejD1jqh7tyQCJvpft56zvewLgBX7234D9gbeGfGaAovvCGhZx5sT.RWiOmrv9J2Dq l2FO_c0nLbv3iDMfxJ8d1Kx7jFz9_bjxdXCKQcmoBolxdCFOZlZsXYviniw8GUB5HvFFdNFcKZCg p08IQKMKaPjqESTlXVEV8sdCRF0bBK6W30gVj.tlVewfQDZxUX640wkU7gSrNtP3zdIAMp4YztSx LUfQu6Dm4Ki4BLXOUIEAxT75wOCXBaSni9aK9_xsUxW0S9dw.rF1IjMEmDMJlVz.ZlQJMJrRZAL2 j6b2DZnKC_z7sHvijmbjQDLVSzIe1EKamg4RerzFPAJ8.cl51hBJAY5WRS_q93JCX35MuhL4dzD8 .xmWUFKGZ9BzTfPg.wZGLay.cTxCgoGd6of5AZCZ6opqFsFrcbPuYV8ICiJ.v2BR.aiuaRqfPtWP h3vyK X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Wed, 6 Jul 2022 12:24:02 +0000 Date: Wed, 6 Jul 2022 12:24:00 +0000 (UTC) From: Ludwig Isaac Lim To: "pgsql-general@postgresql.org" Message-ID: <1797402460.2041897.1657110240951@mail.yahoo.com> Subject: Error when pasting function blocks into psql MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2041896_1117742436.1657110240949" References: <1797402460.2041897.1657110240951.ref@mail.yahoo.com> X-Mailer: WebService/1.1.20381 YMailNorrin Content-Length: 3809 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_2041896_1117742436.1657110240949 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello: I noticed that I'm getting errors when copy and pasting code for stored pro= cedure from Windows directly into psql running in putty. To reproduce create a procedure that has multiple statements with each stat= ements having multiple lines, similar to the ones below: CREATE OR REPLACE PROCEDURE test()AS$$=C2=A0 =C2=A0 =C2=A0UPDATE=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0table1=C2= =A0 =C2=A0 =C2=A0 SET=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0field1 =3D ?; =C2=A0 =C2=A0 =C2=A0 =C2=A0-- more SQL statements$$LANGUAGE SQL; Copy and paste from Windows editor (or IDE) to a psql running in a Putty. C= hances 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 Is there a way of prevent this kind of error when pasting directly into psq= l? I'm using the latest version of PostgreSQL (server and client. Version 1= 4.4) Thank you in advance,Ludwig Lim ------=_Part_2041896_1117742436.1657110240949 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 multi= ple lines, similar to the ones below:

CREATE OR REPLACE P= ROCEDURE test()
AS
$$
     UPDATE
=                      = ;table1
      SE= T
        &= nbsp;          field1 =3D ?;

       --= more SQL statements
$$
LANGUAGE SQL;

Copy a= nd 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 P= ostgreSQL (server and client. Version 14.4)

Thank you in = advance,
Ludwig Lim
= ------=_Part_2041896_1117742436.1657110240949--