Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > I'm trying to avoid doing it in C as it seems like it would be a pita.
I think it would be simpler in C than this mess in SQL is ;-). You would not of course implement it in any way that would look like the SQL query ... but there are existing utility subroutines for most of the bits that are being done with joins here. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly