Re: Is this correct behavior for ON DELETE rule? - Mailing list pgsql-general

From Rick Schumeyer
Subject Re: Is this correct behavior for ON DELETE rule?
Date
Msg-id 000d01c51ba0$0d875f20$0200a8c0@dell8200
Whole thread Raw
In response to Re: Is this correct behavior for ON DELETE rule?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Is this correct behavior for ON DELETE rule?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
I tried that, but I get a "...violates foreign-key constraint" error.

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@postgresql.org] On Behalf Of Bruce Momjian
> Sent: Friday, February 25, 2005 6:23 PM
> To: Rick Schumeyer
> Cc: 'PgSql General'
> Subject: Re: [GENERAL] Is this correct behavior for ON DELETE rule?
>
>
> Uh, because of your REFERENCES clause you have to delete from 'item'
> first, then 'book':
>
> > -- delete to item and book instead of bookview
> > create rule bookviewdel as on delete to bookview do instead (
> >       delete from item where id=old.id;
> >       delete from book where id=old.id;
> > );
>


pgsql-general by date:

Previous
From: "Rick Schumeyer"
Date:
Subject: Re: Is this correct behavior for ON DELETE rule?
Next
From: Bruce Momjian
Date:
Subject: Re: Is this correct behavior for ON DELETE rule?