Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1DA17B5DBDC for ; Mon, 4 Jul 2011 15:32:15 -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 91364-09 for ; Mon, 4 Jul 2011 18:32:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from eastrmfepo101.cox.net (eastrmfepo101.cox.net [68.230.241.213]) by mail.postgresql.org (Postfix) with ESMTP id 44DC8B5DBD6 for ; Mon, 4 Jul 2011 15:32:06 -0300 (ADT) Received: from eastrmimpo01.cox.net ([68.1.16.119]) by eastrmfepo101.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20110704183157.XNS3772.eastrmfepo101.cox.net@eastrmimpo01.cox.net> for ; Mon, 4 Jul 2011 14:31:57 -0400 Received: from slacker.ja10629.home ([68.106.109.147]) by eastrmimpo01.cox.net with bizsmtp id 3uXt1h0073Ar1Vg02uXtMu; Mon, 04 Jul 2011 14:31:57 -0400 X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020205.4E12071D.001B,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=1.1 cv=+zmVqi6HbhBxOY6lzrsfnB2wShF2MeCUcHVIQWL6sOU= c=1 sm=1 a=z1TLwsU0kBEA:10 a=bzbpU1KvNssA:10 a=PjkiJtDTOQ4A:10 a=ZcFhQy0-F_sA:10 a=kj9zAlcOel0A:10 a=sXZhTwfwSKhiTs9RzZXpNQ==:17 a=9I5xiGouAAAA:8 a=pGLkceISAAAA:8 a=epTmVMiNAAAA:8 a=L9jOsvaEBPzVcULA6VwA:9 a=ibNz_0jkkAnWDP5MFPgA:7 a=CjuIK1q_8ugA:10 a=Du3yRyqOjqsA:10 a=2fPOlPt4dusA:10 a=MSl-tDqOz04A:10 a=YObXiYvaVLwA:10 a=sXZhTwfwSKhiTs9RzZXpNQ==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: from wcuddy by slacker.ja10629.home with local (Exim 4.72) (envelope-from ) id 1Qdnw1-0005MS-03 for pgsql-sql@postgresql.org; Mon, 04 Jul 2011 14:31:53 -0400 Date: Mon, 4 Jul 2011 14:31:52 -0400 From: lists-pgsql@useunix.net To: pgsql-sql@postgresql.org Subject: Re: Usage of function retruning record in query Message-ID: <20110704183152.GJ13621@slacker.ja10629.home> References: <1309762075448-4549140.post@n5.nabble.com> <868vseduyv.fsf@mgm.protecting.net> <1309787989162-4550092.post@n5.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1309787989162-4550092.post@n5.nabble.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.778 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201107/4 X-Sequence-Number: 35574 Sorry, I don't have a useful answer but I have a similar question. Along these same lines how does one access the discreet x,y components of type 'point'? On Mon, Jul 04, 2011 at 06:59:49AM -0700, gmb wrote: > > Harald Fuchs-10 wrote: > > In article <1309762075448-4549140.post@n5.nabble.com>,gmb > > <gmbouwer@gmail.com> writes: > > SELECT itemid, (calcvalues(itemid)).* FROM itemlist > > > > Thanks for the feedback, Harald. > > How about specifying different aliases to the resulting values? > This will be handy when I use the same function multiple times in the same > query. > (the function will take another input parameters used in the calculations) > > E.g.: > SELECT itemid, (calcvalues(itemid, '2011-06-06')).*, (calcvalues(itemid, > '2011-06-07')).* FROM itemlist; > > itemid | calcval1 | calcval2 | calcval1 | calcval2 > --------+----------+----------+----------+---------- > 4 | 0.67 | 10.00 | 0.64 | 65.23 > 5 | 1.55 | 45.00 | 1.23 | 23.25 > 6 | 3.60 | 69.00 | 2.98 | 62.66 > How will I manage unique column names for this output? > > -- > View this message in context: http://postgresql.1045698.n5.nabble.com/Usage-of-function-retruning-record-in-query-tp4549140p4550092.html > Sent from the PostgreSQL - sql mailing list archive at Nabble.com. > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql