=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.