From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: end of COPY |
Date: | 2025-03-05 15:40:33 |
Message-ID: | CANzqJaCW48poyRujU_vzdO1UwbhqHyXiWgt1sRtLxpWKc5W++A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Mar 5, 2025 at 10:22 AM Marc Millas <marc(dot)millas(at)mokadb(dot)com> 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!
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2025-03-05 15:52:24 | Re: end of COPY |
Previous Message | Marc Millas | 2025-03-05 15:22:30 | end of COPY |