pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 王学敏 <wang1352083@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:24:40 +0800 (CST)
Message-ID: <21c10616.195a8.146d82287df.Coremail.wang1352083@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





来自网易手机号码邮箱了解更多

view thread (6+ messages)  latest in thread

Message-ID: <21c10616.195a8.146d82287df.Coremail.wang1352083@163.com>
Permalink:  ../21c10616.195a8.146d82287df.Coremail.wang1352083@163.com/
Also on:    postgresql.org/message-id/21c10616.195a8.146d82287df.Coremail.wang1352083@163.com

 · 

reply

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: wang1352083@163.com
  Subject: Re: pg import text data to not null  table  comma error but semicolon right
  In-Reply-To: <21c10616.195a8.146d82287df.Coremail.wang1352083@163.com>
  References: <21c10616.195a8.146d82287df.Coremail.wang1352083@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