From: hubert depesz lubaczewski <depesz@depesz.com>
To: buschmann@nidsa.net
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16639: Syntax error in pgsql when executing local \copy instead of SQL copy
Date: Mon, 28 Sep 2020 15:46:10 +0200
Message-ID: <20200928134610.GA9565@depesz.com> (raw)
In-Reply-To: <16639-ec6ab8b4776f64b2@postgresql.org>
References: <16639-ec6ab8b4776f64b2@postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: depesz@depesz.com, buschmann@nidsa.net, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16639: Syntax error in pgsql when executing local \copy instead of SQL copy
In-Reply-To: <20200928134610.GA9565@depesz.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox