Re: mass import to table with unique index

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: mass import to table with unique index
Дата
Msg-id 3E391DD1.21800.35C5627@localhost
обсуждение исходный текст
Ответ на mass import to table with unique index  (John Smith <john_smith_45678@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: how much memory to allot to postgres?
Следующее
От: Lincoln Yeoh
Дата:
Сообщение: Re: Perl DBI and placeheld values