From: Rob Sargent <robjsargent@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: psql \copy with multi-line query
Date: Fri, 24 Mar 2023 17:25:29 -0600
Message-ID: <8466823d-0b88-883e-ef51-e5df047bbe91@gmail.com> (raw)
In-Reply-To: <CAKFQuwYHXdsx6MQ_jZWU3mgm+5GZVD6BEeB_gL7++pFGyM_ZXw@mail.gmail.com>
References: <89a56b8a-6876-eeb3-12d6-a0761581ce1d@gmail.com>
<CAKFQuwYHXdsx6MQ_jZWU3mgm+5GZVD6BEeB_gL7++pFGyM_ZXw@mail.gmail.com>
On 3/24/23 17:14, David G. Johnston wrote:
> On Fri, Mar 24, 2023 at 4:04 PM Rob Sargent <robjsargent@gmail.com> wrote:
>
> Using version 13 psql on version 14 server and having trouble
> sending a multi-line select in the \copy. I don't see any remark
> about this in the man page.
>
>
> The copy meta-command cannot contain newlines. You should use "COPY
> ... TO STDOUT" directly instead.
>
> All of this is discussed under "\copy" in the documentation (including
> notes).
>
> https://www.postgresql.org/docs/current/app-psql.html
>
> David J.
>
Thank you. I realize now I went to COPY not \copy docs.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com, david.g.johnston@gmail.com
Subject: Re: psql \copy with multi-line query
In-Reply-To: <8466823d-0b88-883e-ef51-e5df047bbe91@gmail.com>
References: <89a56b8a-6876-eeb3-12d6-a0761581ce1d@gmail.com> <CAKFQuwYHXdsx6MQ_jZWU3mgm+5GZVD6BEeB_gL7++pFGyM_ZXw@mail.gmail.com> <8466823d-0b88-883e-ef51-e5df047bbe91@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox