On Thu, Jun 26, 2003 at 02:12:22PM +0100, Richard Huxton wrote: <snip>
> It looks like he has a centralised "address" table with "customer_addresses" > linking "customer" to "address". Likewise for "supplier". > > His problem was he wanted to remove address details when nothing referred to > them any more. I'd run an garbage collection over the db from time to time. It should be an easy test to select (or delete) all address rows which ID doesnt exist anywhere else. You can easily put this in an function. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux ITS Webhosting ab 5 EUR/Monat. UUCP, rawIP und vieles mehr. phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: [EMAIL PROTECTED] cellphone: +49 174 7066481 smsgate: [EMAIL PROTECTED] --------------------------------------------------------------------- Diese Mail wurde mit UUCP versandt. http://www.metux.de/uucp/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match