Re: Add partial :-variable expansion to psql \copy

From: Christoph Berg <myon(at)debian(dot)org>
To: Fabien Coelho <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add partial :-variable expansion to psql \copy
Date: 2025-04-01 10:00:10
Message-ID: Z-u5KsJCRn2IEVja@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Fabien Coelho
> (1) it seems that is the only command which is really full SQL hidden in a
> backslash command

Perhaps this form could be improved by changing `\copy (select) to file`
to something like `select \gcopy (to file)`. That might make :expansion
in the "select" part easier to handle.

I've heard several complaints that `\copy (select)` can't be wrapped
over several lines, so offering the alternative syntax in parallel to
\copy would also solve another problem.

Christoph

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2025-04-01 10:15:30 Re: Add partial :-variable expansion to psql \copy
Previous Message vignesh C 2025-04-01 09:45:28 Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).