On Mon, Sep 28, 2020 at 01:25:08PM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16639
> Logged by: Hans Buschmann
> Email address: buschmann@nidsa.net
> PostgreSQL version: 13.0
> Operating system: Linux x64 or Windows 64bit
> Description:
>
> Deriving from a much longer query in our application I managed to extract a
> short query which shows the error for $subject:
>
>
> \copy (
> with
\copy is psql command, and has to be in single line.
You can see it by entering:
\copy (
and then pressing enter in psql.
Docs mention:
>> Another way to obtain the same result as \copy ... to is to use the SQL COPY
>> ... TO STDOUT command and terminate it with \g filename or \g |program. Unlike
>> \copy, this method allows the command to span multiple lines; also, variable
>> interpolation and backquote expansion can be used.
Best regards,
depesz