Re: [SQL] Can i force deletion of dependent rows?

2010-02-13 Thread Tim Landscheidt
Shruthi A wrote: > Thanks people, but the trigger doesnt really solve my problem. You see, > there is actually a CHAIN of dependencies where B references A, C references > B, D and E reference C and so on... So if i start writing triggers for all > these, there'll be a huge process to follow.

Re: [SQL] Can i force deletion of dependent rows?

2010-02-13 Thread Shruthi A
Thanks people, but the trigger doesnt really solve my problem. You see, there is actually a CHAIN of dependencies where B references A, C references B, D and E reference C and so on... So if i start writing triggers for all these, there'll be a huge process to follow. I'm not strictly against i

Re: [SQL] Can i force deletion of dependent rows?

2010-02-13 Thread Shoaib Mir
On Sat, Feb 13, 2010 at 10:23 PM, Wayne E. Seguin wrote: > Is there another answer, asside from in the application and/or as a > trigger using `DELETE FROM B WHERE z = 'x';` as it's body? > > > Did you look at ON DELETE CASCADE option, check out http://www.postgresql.org/docs/8.3/interactive/ddl-c

Re: [SQL] Can i force deletion of dependent rows?

2010-02-13 Thread Wayne E. Seguin
Is there another answer, asside from in the application and/or as a trigger using `DELETE FROM B WHERE z = 'x';` as it's body? ~Wayne -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql