Search Postgresql Archives

Re: Is this correct behavior for ON DELETE rule?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I tried that, but I get a "...violates foreign-key constraint" error.

> -----Original Message-----
> From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-
> owner@xxxxxxxxxxxxxx] On Behalf Of Bruce Momjian
> Sent: Friday, February 25, 2005 6:23 PM
> To: Rick Schumeyer
> Cc: 'PgSql General'
> Subject: Re:  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;
> > );
> 


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux