Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X09Ao-0001oy-8U for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Jun 2014 12:53:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X09An-0003sq-PU for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Jun 2014 12:53:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X09An-0003sj-4u for pgsql-bugs@postgresql.org; Thu, 26 Jun 2014 12:53:05 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1X09Aj-0001Ad-B7 for pgsql-bugs@postgresql.org; Thu, 26 Jun 2014 12:53:04 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1X09Af-0006SU-Pd for pgsql-bugs@postgresql.org; Thu, 26 Jun 2014 05:52:57 -0700 Date: Thu, 26 Jun 2014 05:52:57 -0700 (PDT) From: David G Johnston To: pgsql-bugs@postgresql.org Message-ID: <1403787177772-5809346.post@n5.nabble.com> In-Reply-To: <21c10616.195a8.146d82287df.Coremail.wang1352083@163.com> References: <21c10616.195a8.146d82287df.Coremail.wang1352083@163.com> Subject: Re: pg import text data to not null table comma error but semicolon right MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org =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=20=20=20=20= =20=20=20=20=20=20=20=20=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. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs