FOREIGN KEY - Mailing list pgsql-general

From Andras Balogh
Subject FOREIGN KEY
Date
Msg-id 002b01c1048f$a8bba9f0$0d00a8c0@grafx.ro
Whole thread Raw
List pgsql-general
Hi,
 
I have created a table is postgres with a FOREIGN KEY reference to
another table.
I am using the COPY command to copy the data from a file to this table.
I am getting this error:
referential integrity violation - key referenced from A not found in B
 
I understand that I am inserting a row in A with an id that is not in table B,
I want to ignore those inserts that are violating the referential integrity.
What should i do?  
 
Aslo i didn't find a way to list the FOREIGN KEYS in a table
\d <tablename> it gives only the structure.
 
Any input is welcomed,
 
Andras.

pgsql-general by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: bit operations
Next
From: Scott Holmes
Date:
Subject: Re: lo wrappers - still working on it