pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Timothy Covell <dirac@applink.net>
To: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Foreign Keys Help Delete!
Date: Tue, 19 Sep 2000 18:49:23 -0500
Message-ID: <000371abbd90c460_mailit@smtp.applink.net> (raw)


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




view thread (7+ messages)  latest in thread

Message-ID: <000371abbd90c460_mailit@smtp.applink.net>
Permalink:  ../000371abbd90c460_mailit@smtp.applink.net/
Also on:    postgresql.org/message-id/000371abbd90c460_mailit@smtp.applink.net

 · 

reply

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-sql@postgresql.org
  Cc: dirac@applink.net, pgsql-general@postgresql.org
  Subject: Re: Foreign Keys Help Delete!
  In-Reply-To: <000371abbd90c460_mailit@smtp.applink.net>
  References: <000371abbd90c460_mailit@smtp.applink.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