X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id EF91D11F66D8 for ; Wed, 5 Apr 2006 18:31:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98877-02 for ; Wed, 5 Apr 2006 18:31:25 -0300 (ADT) X-Greylist: delayed 01:00:01.056414 by SQLgrey- Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by postgresql.org (Postfix) with ESMTP id 3832F11F66CE for ; Wed, 5 Apr 2006 18:31:22 -0300 (ADT) X-T2-Posting-ID: q0GPJAWg7ADSoZUTpWu14w== X-Cloudmark-Score: 0.000000 [] Received: from [84.19.128.181] (account mj374011@tele2.se HELO [192.168.1.10]) by mailfe06.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTPA id 174241382 for pgsql-sql@postgresql.org; Wed, 05 Apr 2006 22:31:20 +0200 Mime-Version: 1.0 (Apple Message framework v749.3) In-Reply-To: <200604051257.09980.michael@engtech.ca> References: <200604051257.09980.michael@engtech.ca> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <40485D0C-8C3A-4206-9825-3A459934F356@tele2.se> Content-Transfer-Encoding: 7bit From: Niklas Johansson Subject: Re: SELECT composite type Date: Wed, 5 Apr 2006 22:31:16 +0200 To: pgsql-sql@postgresql.org X-Mailer: Apple Mail (2.749.3) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.452 required=5 tests=[AWL=-0.027, DNS_FROM_RFC_ABUSE=0.479] X-Spam-Score: 0.452 X-Spam-Level: X-Archive-Number: 200604/26 X-Sequence-Number: 24835 On 5 apr 2006, at 17.57, Michael Burke wrote: > So I basically want to call get_xy for every row in > sightings, and use its output for two columns; or perhaps there is > another > way to think of this. You could try SELECT foo.x, foo.y, title FROM (SELECT get_xy(SetSRID(sightings.location, 26910), 4326) AS foo, sightings.title FROM sightings WHERE sighting_id = 25) bar; Sincerely, Niklas Johansson