Dear Daniel, David
On Mon, 25 Apr 2022 at 18:07, David G. Johnston
wrote:
> On Mon, Apr 25, 2022 at 1:24 AM Jiří Fejfar wrote:
>
>> contrib_regression=# copy (select 1) to :'afile';
>>
>
> Hopefully you realize that COPY is going to place that file on the server,
> not send it to the psql clien
On Mon, Apr 25, 2022 at 1:24 AM Jiří Fejfar wrote:
> contrib_regression=# copy (select 1) to :'afile';
>
Hopefully you realize that COPY is going to place that file on the server,
not send it to the psql client to be placed on the local machine.
The best way to do copy in psql is:
\set afile '.
Jiří Fejfar wrote:
> I have found maybe buggy behaviour (of psql parser?) when using psql \copy
> with psql variable used for filename.
While it's annoying that it doesn't work as you tried it, this behavior is
documented, so in that sense it's not a bug.
The doc also suggests a workarou