| От | Tom Lane |
|---|---|
| Тема | Re: copy data into table error |
| Дата | |
| Msg-id | 13890.1038370188@sss.pgh.pa.us обсуждение |
| Ответ на | copy data into table error ("Johnson, Shaunn" <SJohnson6@bcbsm.com>) |
| Список | pgsql-general |
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> But when I change the table structure from char(2) to char(3)
> the data gets imported. I'm thinking I have some odd dos
> or control character (^M) in the column, but, when I use vi, I
> can't find it and I've stripped out all spaces. What is
> the error talking about? What is in the last column (text file)
> that PostgreSQL is seeing that I (or, vi) can not?
Are you sure the file is not being saved with Windows-style newlines
(^M^J)? COPY only likes Unix-style newlines (^J) --- it will see the
^M as a data character. (This behavior will likely change for 7.4
but that's how current releases behave.)
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера