From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: pg import text data to not null table comma error but semicolon right
Date: Thu, 26 Jun 2014 05:52:57 -0700 (PDT)
Message-ID: <1403787177772-5809346.post@n5.nabble.com> (raw)
In-Reply-To: <21c10616.195a8.146d82287df.Coremail.wang1352083@163.com>
References: <21c10616.195a8.146d82287df.Coremail.wang1352083@163.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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-semico...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: david.g.johnston@gmail.com
Subject: Re: pg import text data to not null table comma error but semicolon right
In-Reply-To: <1403787177772-5809346.post@n5.nabble.com>
References: <21c10616.195a8.146d82287df.Coremail.wang1352083@163.com> <1403787177772-5809346.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox