Foreign Keys Help Delete!

From: Timothy Covell <dirac(at)applink(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Foreign Keys Help Delete!
Date: 2000-09-19 23:49:23
Message-ID: 000371abbd90c460_mailit@smtp.applink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql


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(at)applink(dot)net

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-09-19 23:55:46 Re: nasty problem with redhat 6.2 + pg 7.02
Previous Message Edward Q. Bridges 2000-09-19 23:00:04 Proposal for new PL/Perl README

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2000-09-20 00:08:27 Re: [GENERAL] Foreign Keys Help Delete!
Previous Message Tom Lane 2000-09-19 20:27:45 Re: Repeatable reads