From: George Moga <george@dsn.ro>
To: Jaruwan Laongmal <jaruwan@gits.net.th>
To: pgsql-sql@postgresql.org
Subject: Re: problem with copy command
Date: Wed, 11 Apr 2001 12:27:21 +0300
Message-ID: <3AD42379.3FD4F534@dsn.ro> (raw)
References: <001f01c0c196$46bcb000$6d9a96cb@ntl>
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
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-sql@postgresql.org
Cc: george@dsn.ro, jaruwan@gits.net.th
Subject: Re: problem with copy command
In-Reply-To: <3AD42379.3FD4F534@dsn.ro>
References: <001f01c0c196$46bcb000$6d9a96cb@ntl> <3AD42379.3FD4F534@dsn.ro>
* 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