| От | Tom Lane |
|---|---|
| Тема | Re: Trouble w/ COPY command |
| Дата | |
| Msg-id | 19492.1334448062@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Trouble w/ COPY command (Wells Oliver <wellsoliver@gmail.com>) |
| Список | pgsql-admin |
Wells Oliver <wellsoliver@gmail.com> writes:
> I have CSV files blowing up because they have double quotes around numeric
> values: " 1.34" yields ERROR: invalid input syntax for type numeric: "
> 1.34"
Is that an exact copy of the error message? Because there are double
quotes in that error message's text; what you are showing does not
suggest that they are part of the data value. I'm wondering about
non-visible characters myself.
> And occasionally these are empty, and you see invalid syntax for type
> numeric: " "
Well, that you're going to have to do something else about. Possibly
you could treat the empty string as null? (See the 'null string'
option to COPY.)
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера