Re: BUG #15535: psql: \copy: parse error at...

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #15535: psql: \copy: parse error at...
Дата
Msg-id CAKFQuwZpKkN3E_FC+Z=J11ncdVBzCWVX24c4KPhrMt+xz1Ed+w@mail.gmail.com
обсуждение исходный текст
Ответ на RE: BUG #15535: psql: \copy: parse error at...  ("Voillequin, Jean-Marc" <Jean-Marc.Voillequin@moodys.com>)
Ответы Re: BUG #15535: psql: \copy: parse error at...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Wednesday, December 5, 2018, Voillequin, Jean-Marc <Jean-Marc.Voillequin@moodys.com> wrote:

SIMPLE=> \copy (select * from /*comment*/ pg_tables) to 'test';

COPY 76

 

SIMPLE=> \copy (select * from /*comment with a closing parenthesis)*/ pg_tables) to 'test';

\copy: parse error at "*/"

 

Only comments without parenthesis are supported?


More or less...the stuff between the parentheses is a query to be sent to the server for execution and that is basically just plain text as far as psql is concerned.  That it contains comments for the server to interpret is just passing through of unevaluated text.  psql \copy doesn't understand comments.

David J.

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

Предыдущее
От: "Voillequin, Jean-Marc"
Дата:
Сообщение: RE: BUG #15535: psql: \copy: parse error at...
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #15536: ERROR: column "value " does not exist