Re: BUG #16639: Syntax error in pgsql when executing local \copy instead of SQL copy

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: BUG #16639: Syntax error in pgsql when executing local \copy instead of SQL copy
Дата
Msg-id 20200928134610.GA9565@depesz.com
обсуждение исходный текст
Ответ на BUG #16639: Syntax error in pgsql when executing local \copy instead of SQL copy  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
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




В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16639: Syntax error in pgsql when executing local \copy instead of SQL copy
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16640: Documentation table formatting issue