postgres 多表删除
DELETE FROM stock_quant q USING product_product p ,product_template t WHERE q.product_id=p.id AND p.product_tmpl_id=t.id AND t.pos_config='6';
DELETE FROM pos_order_line l USING product_product p ,product_template t WHERE l.product_id=p.id AND p.product_tmpl_id=t.id AND t.pos_config='6';
DELETE FROM product_template WHERE pos_config='6';
SELECT * FROM product_template WHERE pos_config='6';