Re: pg import text data to not null table comma error but semicolon right

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: pg import text data to not null table comma error but semicolon right
Дата
Msg-id 1403787177772-5809346.post@n5.nabble.com
обсуждение исходный текст
Ответ на pg import text data to not null table comma error but semicolon right  (王学敏 <wang1352083@163.com>)
Список pgsql-bugs
=E7=8E=8B=E5=AD=A6=E6=95=8F wrote
> Hi,
> when i imort data from csv to table ,there may be some error
> create table t(d1 text not null,d2 text not null,d3 text not null);
>=20
>  \copy t(d1,d2,d3) from 'comma.text' with  delimiter ',';             =20
> ERROR:  missing data for column "d2"
> CONTEXT:  COPY t, line 1: "a;b;c"
>=20
>  \copy t(d1,d2,d3) from 'semicolon.text' with  delimiter ';' ;
> --no error
> cat comma.text
> a,b,c
> e,,f
>=20
> cat semicolon.text
> a;b;c
> e;;f

Apparently the comma.text file you are trying to import and the one you are
cat'ing are not the same file...

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/pg-im=
port-text-data-to-not-null-table-comma-error-but-semicolon-right-tp5809343p=
5809346.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: 王学敏
Дата:
Сообщение: pg import text data to not null table comma error but semicolon right
Следующее
От: Matheus de Oliveira
Дата:
Сообщение: Re: pg import text data to not null table comma error but semicolon right