Re: mass import to table with unique index - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: mass import to table with unique index
Date
Msg-id 3E391DD1.21800.35C5627@localhost
Whole thread Raw
In response to mass import to table with unique index  (John Smith <john_smith_45678@yahoo.com>)
List pgsql-general
On 29 Jan 2003 at 15:00, John Smith wrote:

>
> Is there a way to mass import (like COPY, INSERT INTO ... SELECT ...) data into
> an existing table with existing data that has a unique index?
> Such as importing data with SSNs, and there's a unique index on the SSN column.
> MySQL has an 'IGNORE' option for mass imports. Any way with PostgreSQL? Or only
> with an INSERT command for each record?

I don't understand. Why wouldn't copy work in this case? It does insert only
and it does check index, if I am not making a mistake.

I am not sure you want the contraint in place while it is mass importing. You
can always drop the index, mass import data and recreate index if you are sure
what you are doing..


Bye
 Shridhar

--
Fourth Law of Revision:    It is usually impractical to worry beforehand about
interferences -- if you have none, someone will make one for you.


pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: how much memory to allot to postgres?
Next
From: Lincoln Yeoh
Date:
Subject: Re: Perl DBI and placeheld values