From: 王学敏 <15810475206@163.com>
To: pgsql-bugs@postgresql.org
Subject: pg import text data to not null table comma error but semicolon right
Date: Thu, 26 Jun 2014 20:17:58 +0800 (CST)
Message-ID: <5df41de4.194e2.146d81c6872.Coremail.15810475206@163.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
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: 15810475206@163.com
Subject: Re: pg import text data to not null table comma error but semicolon right
In-Reply-To: <5df41de4.194e2.146d81c6872.Coremail.15810475206@163.com>
References: <5df41de4.194e2.146d81c6872.Coremail.15810475206@163.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