Re: [SQL] apparent RI bug

2008-04-03 Thread Stephan Szabo
On Wed, 2 Apr 2008, chester c young wrote: 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

Re: [SQL] apparent RI bug

2008-04-03 Thread chester c young
Stephan Szabo [EMAIL PROTECTED] wrote: On Wed, 2 Apr 2008, chester c young wrote: it appears I have a broken RI in my db. Yeah, that looks pretty broken. Can you reproduce this from a clean start repeatedly or is this a one off? Do you ever turn off triggers, perhaps by modifying the

Re: [SQL] apparent RI bug

2008-04-03 Thread Stephan Szabo
On Thu, 3 Apr 2008, chester c young wrote: Stephan Szabo [EMAIL PROTECTED] wrote: On Wed, 2 Apr 2008, chester c young wrote: it appears I have a broken RI in my db. Yeah, that looks pretty broken. Can you reproduce this from a clean start repeatedly or is this a one off? Do you

Re: [SQL] apparent RI bug

2008-04-03 Thread chester c young
--- Stephan Szabo [EMAIL PROTECTED] wrote: Is it possible you ever had a before delete trigger that just did a return NULL rather than raising an exception? IIRC, explicitly telling the system to ignore the delete will work on the referential actions. yes, it is possible, for example, a

Re: [SQL] apparent RI bug

2008-04-03 Thread Stephan Szabo
On Thu, 3 Apr 2008, chester c young wrote: --- Stephan Szabo [EMAIL PROTECTED] wrote: Is it possible you ever had a before delete trigger that just did a return NULL rather than raising an exception? IIRC, explicitly telling the system to ignore the delete will work on the referential

Re: [SQL] apparent RI bug

2008-04-03 Thread chester c young
--- Stephan Szabo [EMAIL PROTECTED] wrote: is it is possible, for example, a function without a body or without a return old. are you saying this would override the RI constraint? If it returned something that would have prevented the delete without an error, yes. this is very good

[SQL] apparent RI bug

2008-04-02 Thread chester c young
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