referential integrity on existing table

Поиск
Список
Период
Сортировка
От Adam Fisher
Тема referential integrity on existing table
Дата
Msg-id 9up2fn$tac$1@news.tht.net
обсуждение исходный текст
Ответы Re: referential integrity on existing table  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Список pgsql-general
Hi Everyone

My question is, is it possible to create a referential integrity constraint
on an exisiting, already populated, table??
My reasons for this are:

I am trying to copy two delimited text files into a database using the COPY
command. The first file - with about 280,000 lines - takes about 5-10
minutes to copy. The second file - with about 89,000 lines - is still
running after 4 days!
This second table has refrential integrity constraints on 3 fields (it's a
15 field table)

I have also copied this file into a table with no refential integrity
constraints and then used an INSERT command to copy the records into the
correct table. This is also taking days.

So, if I can't copy this file into a table and then apply the referential
integrity constraints, can anybody help me work out what my options are?

Thanks

Adam Fisher






В списке pgsql-general по дате отправления:

Предыдущее
От: GB Clark II
Дата:
Сообщение: Re: Syslog
Следующее
От: "Mourad EL HADJ MIMOUNE"
Дата:
Сообщение: Limit of sequence