Does ON DELETE CASCADE not work for you?
Other than that you would have do do outer join acrobatics ;-)
Best Regards;
Chris Travers
----- Original Message -----
From: John Smith
To: pgsql-general(at)postgresql(dot)org
Sent: Wednesday, February 05, 2003 12:55 PM
Subject: [GENERAL] Deleting orphan records
Does anybody have a method for deleting orphan (unreferenced) records? Is it possible to set up some sort of constraint or trigger (that performs well when lots of records are deleted ;) )?
------------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now