public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: end of COPY
Date: Wed, 5 Mar 2025 10:40:33 -0500
Message-ID: <CANzqJaCW48poyRujU_vzdO1UwbhqHyXiWgt1sRtLxpWKc5W++A@mail.gmail.com> (raw)
In-Reply-To: <CADX_1abY=D3o4Env3kzUnuMarBKt+iwAiVvfHiVZrhgMit6KkQ@mail.gmail.com>
References: <CADX_1abY=D3o4Env3kzUnuMarBKt+iwAiVvfHiVZrhgMit6KkQ@mail.gmail.com>

On Wed, Mar 5, 2025 at 10:22 AM Marc Millas <[email protected]> wrote:

> Hi,
> on a Postgres 16 DB running on a redhat 8.5 x86 machineI want to input
> some data using copy from stdin
> so.. more that 700 000 lines goes well.
> Then the flow contains a single line: \.
> to my understanding this means end of the copy
>

I just tested this on PG 16.8.  No backslash.
$ psql TAP -Xc "copy public.job_notification TO STDOUT;"

https://www.postgresql.org/docs/16/sql-copy.html
"End of data *can be* represented by a single line containing just
backslash-period (\.)."
"the end-of-data marker (\.) or the null string (\N by default)."


> but, Postgres generates an error :
> invalid input syntax for type numeric "\."
> then the 2 lines stating the copy command that was executed.
>
> what am I missing ?
>

COPY is expecting something after the backslash.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (5+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: end of COPY
  In-Reply-To: <CANzqJaCW48poyRujU_vzdO1UwbhqHyXiWgt1sRtLxpWKc5W++A@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox