From: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: pg import text data to not null table comma error but semicolon right |
Date: | 2014-06-26 12:52:57 |
Message-ID: | 1403787177772-5809346.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
王学敏 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);
>
> \copy t(d1,d2,d3) from 'comma.text' with delimiter ',';
> ERROR: missing data for column "d2"
> CONTEXT: COPY t, line 1: "a;b;c"
>
> \copy t(d1,d2,d3) from 'semicolon.text' with delimiter ';' ;
> --no error
> cat comma.text
> a,b,c
> e,,f
>
> 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-import-text-data-to-not-null-table-comma-error-but-semicolon-right-tp5809343p5809346.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Matheus de Oliveira | 2014-06-26 12:57:32 | Re: pg import text data to not null table comma error but semicolon right |
Previous Message | 王学敏 | 2014-06-26 12:24:40 | pg import text data to not null table comma error but semicolon right |