From: Cliff Wells <logiplexsoftware@earthlink.net>
To: pgsql-admin@postgresql.org
Subject: Removing records that violate foreign key
Date: Tue, 18 Jun 2002 10:12:32 -0700
Message-ID: <20020618101232.04987af7.logiplexsoftware@earthlink.net> (raw)
Hello,
I'm porting an application's data from a proprietary format into PostgreSQL
7.2.1. I'm using ecpg and I basically follow this process:
create tables
create indexes
import data
add foreign key constraints
I have to add the foreign key constraint last as otherwise the import will fail
as the records being referenced won't necessarily exist in PostgreSQL yet. The
problem is that now I'd like to delete any records that violate the constraint.
Any suggestions on a quick way to do this?
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308 (800) 735-0555 x308
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: logiplexsoftware@earthlink.net
Subject: Re: Removing records that violate foreign key
In-Reply-To: <20020618101232.04987af7.logiplexsoftware@earthlink.net>
References: <20020618101232.04987af7.logiplexsoftware@earthlink.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox