Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id ADD141337B4E for ; Fri, 15 Apr 2011 18:28:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 21752-03 for ; Fri, 15 Apr 2011 21:28:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 90F8D1337BFC for ; Fri, 15 Apr 2011 18:28:07 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 15 Apr 2011 16:28:07 -0500 Message-Id: <4DA8720F020000250003C8D5@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 15 Apr 2011 16:27:59 -0500 From: "Kevin Grittner" To: "Merlin Moncure" Cc: ,"Tom Lane" , "Rikard Pavelic" Subject: Re: BUG #5982: recursive type crashes postgres References: <201104151834.p3FIYSQ0067290@wwwmaster.postgresql.org> <28780.1302894395@sss.pgh.pa.us> <4DA8AAD7.9000606@zg.htnet.hr> <4DA86904020000250003C8CD@gw.wicourts.gov> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/117 X-Sequence-Number: 30036 Merlin Moncure wrote: > There are lots of use cases for this. I use composite types to > marshal data to the client all the time, and recursive structures > are fairly common in many classic problems. Recursive composites > fit the bill perfectly. I'm trying to get my head around why SQL composite types are a good way to marshal complex object graphs with recursion. I can see where it could be done, I'm still not convinced that it's better than SQL passing out data in tabular form with relationship established by matching values. In other words, when is it a good idea to do the relation to object mapping in the database engine? -Kevin