From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Ken Godee <ken(at)perfect-image(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Copy/foreign key contraints |
Date: | 2002-12-13 16:41:57 |
Message-ID: | 20021213083938.X23623-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Luc Lachance | 2002-12-13 16:42:25 | Re: [PERFORM] CLUSTER command |
Previous Message | Reid Thompson | 2002-12-13 16:25:00 | pg_hba.conf authorization question |