Received: from ns.dsn.ro ([217.156.107.1]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3B9Sa807135 for ; Wed, 11 Apr 2001 05:28:42 -0400 (EDT) (envelope-from george@dsn.ro) Received: from dsn.ro (IDENT:george@george.dsn.ro [217.156.107.12]) by ns.dsn.ro (8.10.2/8.10.2) with ESMTP id f3B9NuW05241; Wed, 11 Apr 2001 12:23:57 +0300 Message-ID: <3AD42379.3FD4F534@dsn.ro> Date: Wed, 11 Apr 2001 12:27:21 +0300 From: George Moga Organization: DataSystems Srl Slobozia X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: Jaruwan Laongmal , pgsql-sql@postgresql.org Subject: Re: problem with copy command References: <001f01c0c196$46bcb000$6d9a96cb@ntl> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/151 X-Sequence-Number: 2499 Jaruwan Laongmal wrote: > dear all, > I currently using postgresql v7.0.3 > when i import text file to table with command "copy tablename from > '/tmp/a.txt'; > and it shows > "copy: line 20, Cannot insert a duplicate key into unique index testpri_pk" > ,then it exits with doing nothing. > > I want to ignore this errors and continue copy the next record. How to do > that? > if I don't filter in '/tmp/a.txt' before using copy command. > > Thank you so much for your help in advance . > Regards > Jaruwan Try to delete the unique index testpri_pk ... but if you want to create the unique index again you must delete (or modify) you'r not_unique rows. George Moga, Data Systems Srl Slobozia, ROMANIA