Re: Can i force deletion of dependent rows?
От
Shoaib Mir
Тема
Re: Can i force deletion of dependent rows?
Дата
Msg-id
bf54be871002130332h6617b33ateb4dcef3d4213054@mail.gmail.com
Ответ на
Re: Can i force deletion of dependent rows? (Wayne E. Seguin)
Список
Дерево обсуждения
Re: Can i force deletion of dependent rows? Tim Landscheidt <tim@tim-landscheidt.de>
Re: Can i force deletion of dependent rows? Rob Sargent <robjsargent@gmail.com>
Re: Can i force deletion of dependent rows? "Wayne E. Seguin" <wayneeseguin@gmail.com>
Re: Can i force deletion of dependent rows? Shoaib Mir <shoaibmir@gmail.com>
Re: Can i force deletion of dependent rows? Shruthi A <shruthi.iisc@gmail.com>
On Sat, Feb 13, 2010 at 10:23 PM, Wayne E. Seguin <wayneeseguin@gmail.com> wrote:
--
Shoaib Mir
http://shoaibmir.wordpress.com/
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-constraints.html
CREATE TABLE order_items ( product_no integer REFERENCES products ON DELETE RESTRICT, order_id integer REFERENCES orders ON DELETE CASCADE, quantity integer, PRIMARY KEY (product_no, order_id)
);
--
Shoaib Mir
http://shoaibmir.wordpress.com/
В списке pgsql-sql по дате отправления