Re: import error
| От | Tom Lane |
|---|---|
| Тема | Re: import error |
| Дата | |
| Msg-id | 13248.1043767706@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | import error (Oliver Vecernik <vecernik@aon.at>) |
| Список | pgsql-sql |
Oliver Vecernik <vecernik@aon.at> writes:
> My import gives following error:
> sport=# copy dives from '/var/n/tmp/ov.CSV' delimiters ',';
> ": can't parse "ne 1, pg_atoi: error in "0
The weird formatting of the error message suggests that the problem
is DOS-style newlines (CR/LF). COPY only likes Unix-style newlines
(LF). It thinks the CRs are part of the data, and then the datatype
input routines (like pg_atoi) spit up. Since pg_atoi spits back the
text it couldn't parse (including the CR), you get this bizarre-looking
overprinted message.
Solution: save the import file with Unix newlines, or run it through
a newline-fixing filter.
regards, tom lane
В списке pgsql-sql по дате отправления: