Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B25509FB2F6 for ; Tue, 19 Jun 2007 15:29:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 93125-09 for ; Tue, 19 Jun 2007 15:29:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id BC12A9FA26A for ; Tue, 19 Jun 2007 15:29:53 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1I0iSe-00078r-Uc for pgsql-sql@postgresql.org; Tue, 19 Jun 2007 14:29:53 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 926C83FAF; Tue, 19 Jun 2007 14:29:47 -0400 (EDT) Date: Tue, 19 Jun 2007 14:29:47 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: joining a table whose name is stored in the primary record Message-ID: <20070619182947.GK19744@phlogiston.dyndns.org> References: <4674F357.5040409@bucksvsbytes.com> <20070617155441.GB13671@phlogiston.dyndns.org> <46781A46.9010708@bucksvsbytes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46781A46.9010708@bucksvsbytes.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/145 X-Sequence-Number: 28635 On Tue, Jun 19, 2007 at 02:02:46PM -0400, John Gunther wrote: > Well, Andrew, you're certainly right but I made an exception because of > the data needs. Ah, well, in that case, you'll need something other than SQL for sure. A function as suggested is probably your friend. A -- Andrew Sullivan | ajs@crankycanuck.ca Users never remark, "Wow, this software may be buggy and hard to use, but at least there is a lot of code underneath." --Damien Katz