From: | Reg Me Please <regmeplease(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Syntax error in a large COPY |
Date: | 2007-11-06 18:23:22 |
Message-ID: | 200711061923.29256.regmeplease@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
That seems not to be the case.
The last line has a \. by its own and the last but one is
well formed.
Il Tuesday 06 November 2007 19:14:00 Tom Lane ha scritto:
> Reg Me Please <regmeplease(at)gmail(dot)com> writes:
> > At a certain point I get an error telling about a
> > "invalid input syntax for type numeric"
> > The incriminated line number is the last one (the one containing the \.).
> > Is there a way to know which line is really malformed?
>
> Why do you think the report is inaccurate?
>
> I can reproduce this by putting a few spaces in front of \., for
> instance.
>
> regression=# create table foo(f1 numeric);
> CREATE TABLE
> regression=# copy foo from stdin;
> Enter data to be copied followed by a newline.
> End with a backslash and a period on a line by itself.
>
> >> 123
> >> \.
>
> regression=# copy foo from stdin;
> Enter data to be copied followed by a newline.
> End with a backslash and a period on a line by itself.
>
> >> \.
> >> \.
>
> ERROR: invalid input syntax for type numeric: " "
> CONTEXT: COPY foo, line 1, column f1: " "
> regression=#
>
> As the psql prompt mentions, \. has to be alone on a line.
>
> regards, tom lane
--
Reg me Please
From | Date | Subject | |
---|---|---|---|
Next Message | Marc Breslow | 2007-11-06 18:38:05 | Exclusive Locks Taken on User Tables? |
Previous Message | Tom Lane | 2007-11-06 18:14:00 | Re: Syntax error in a large COPY |