referential integrity on existing table - Mailing list pgsql-general

From Adam Fisher
Subject referential integrity on existing table
Date
Msg-id 9up2fn$tac$1@news.tht.net
Whole thread Raw
Responses Re: referential integrity on existing table
List 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 by date:

Previous
From: GB Clark II
Date:
Subject: Re: Syslog
Next
From: "Mourad EL HADJ MIMOUNE"
Date:
Subject: Limit of sequence