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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "Voillequin, Jean-Marc" <Jean-Marc(dot)Voillequin(at)moodys(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15535: psql: \copy: parse error at...
Date: 2018-12-05 14:23:13
Message-ID: CAKFQuwZpKkN3E_FC+Z=J11ncdVBzCWVX24c4KPhrMt+xz1Ed+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wednesday, December 5, 2018, Voillequin, Jean-Marc <
Jean-Marc(dot)Voillequin(at)moodys(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2018-12-05 14:24:44 Re: BUG #15536: ERROR: column "value " does not exist
Previous Message Voillequin, Jean-Marc 2018-12-05 14:15:40 RE: BUG #15535: psql: \copy: parse error at...