Re: Copy/foreign key contraints - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Copy/foreign key contraints
Date
Msg-id 20021213083938.X23623-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Copy/foreign key contraints  ("Ken Godee" <ken@perfect-image.com>)
List pgsql-general
On Fri, 13 Dec 2002, Ken Godee wrote:

> Being fairly new to postgres I'm trying to find my way
> around this, did some searching and see this has come
> up quite a few times, but..........
>
> table 1: customer.custid primary key
> table 2: transx.custid foreign key
>
> When using COPY to import data I received;
>
> "<unnamed>referential integerity violation-key referenced from
> table transx not found in customer" (fairly vague statement)
>
> I'm sure many know where this is going, but I'll still explain
> what I've tried so far.......
>
> Then created a copy/temp table of transx with no constraints
> and COPY'ed data into it, ran some "where not exists" statements
> against the customer.custid and found no unmatched
> primary/foreign keys. Tried to do an INSERT from the temp table
> into the transx table and still got the referential integerity violation.
> At this point I'm presuming that my data's ok, so now what.....

It's hard to say what's causing that without more details. Can you crete a
simplified self contained example of it misbehaving to send to the list
(or failing that if the data/schema isn't secret and not too big, that)


pgsql-general by date:

Previous
From: "Reid Thompson"
Date:
Subject: pg_hba.conf authorization question
Next
From: Jean-Luc Lachance
Date:
Subject: Re: [PERFORM] CLUSTER command