| От | Tom Lane |
|---|---|
| Тема | Re: copy command - date |
| Дата | |
| Msg-id | 13673.1186970077@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: copy command - date (novice <user.postgresql@gmail.com>) |
| Список | pgsql-general |
novice <user.postgresql@gmail.com> writes:
> db5=> \copy maintenance FROM test.txt
> ERROR: invalid input syntax for integer: "3665 OK SM
> 07/07/13 06:09"
> CONTEXT: COPY maintenance, line 1, column maintenance_id: "3665 OK
> SM 07/07/13 06:09"
It looks to me like your problem is mostly that you don't have tabs
between the fields. I don't think COPY can be taught to parse this
input directly --- you need to preprocess the file to split the fields
apart.
BTW: after you get it split into fields, you're also going to find that
"OK" is not valid input for the integer "meter_id" column.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера