From: chester c young <chestercyoung@yahoo.com>
To: sql pgsql <pgsql-sql@postgresql.org>
Subject: apparent RI bug
Date: Wed, 2 Apr 2008 10:42:36 -0700 (PDT)
Message-ID: <598841.46263.qm@web54306.mail.re2.yahoo.com> (raw)
it appears I have a broken RI in my db.
call_individual.clh_id references call_household.clh_id
\d call_individual
...
Foreign-key constraints:
"call_individual_clh_id_fkey" FOREIGN KEY (clh_id) REFERENCES
call_household(clh_id) ON DELETE CASCADE
however:
development=# select clh_id from call_individual cli where not exists(
select 1 from call_household clh where clh.clh_id=cli.clh_id );
clh_id
--------
14691
should not matter, but call_individual has a pre-delete trigger that
simply raises an exception to prevent deletions:
raise exception 'calls may not be deleted';
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chestercyoung@yahoo.com
Subject: Re: apparent RI bug
In-Reply-To: <598841.46263.qm@web54306.mail.re2.yahoo.com>
* 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