Received: from svr4.applink.net (svr4.applink.net [216.91.192.4]) by hub.org (8.10.1/8.10.1) with ESMTP id e8JNhEs66351; Tue, 19 Sep 2000 19:43:14 -0400 (EDT) Received: from riemann.ashavan.org (56k-02-23.applink.net [206.149.41.23]) by svr4.applink.net (8.10.1/8.10.1) with SMTP id e8JNgFg01310; Tue, 19 Sep 2000 18:42:15 -0500 Subject: Foreign Keys Help Delete! From: Timothy Covell Reply-To: Timothy Covell Message-ID: <000371abbd90c460_mailit@smtp.applink.net> Date: Tue, 19 Sep 2000 18:49:23 -0500 X-Mailer: BeatWare Mail-It 3.0 X-BeOS-Platform: Intel or clone To: pgsql-general@postgresql.org Cc: pgsql-sql@postgresql.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200009/539 DB: Postgresql 7.0.2 OS: Solaris 2.6 Schema: hosts table with fqhn column routes table with fqhn foreign key hosts(fqhn) Problem: 1. When I try to change fqhn in hosts, it complains that I have now violated entry in "routes" table. 2. When I try to update "routes" table, it updates. 3. Go back to "hosts" table and now try to rename/delete old fqhn and it complains about object missing with OID=xxxxx. Questions: 1. What's the proper way to delete foreign keys? (I can dump the DB, edit it, and restore it, but that is not effecient!!) 2. How can I avoid problems such as above, besides not using foreign keys? 3. Are foreign keys broken in pg7.0.2??? TIA tim dirac@applink.net