út 1. 4. 2025 v 12:00 odesílatel Christoph Berg <myon@debian.org> napsal:
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.
What is the reason to use \copy (select) to ?
psql (on client side) supports csv format pretty well with single line switching to this format (i know so it not have the full functionality of COPY statement).
For me, the original proposal has interesting benefits (Tom wrote about it). Inconsistency where psql's variable can or cannot be used is unhappy. It is always bad surprising when you find some inconsistencies