Re: [SQL] Usage of function retruning record in query

2011-07-04 Thread Harald Fuchs
In article <1309762075448-4549140.p...@n5.nabble.com>, gmb writes: > Hi I have a stored function returning a record consisting of two field, > and receiving as input a single identifier: CREATE FUNCTION calcvalues(IN > itemid VACHAR, OUT calcval1 NUMERIC, OUT calcval2 NUMERIC) RETURNS > record...

Re: [SQL] Usage of function retruning record in query

2011-07-04 Thread gmb
Harald Fuchs-10 wrote: > In article <1309762075448-4549140.p...@n5.nabble.com>,gmb > 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 us

Re: [SQL] Usage of function retruning record in query

2011-07-04 Thread lists-pgsql
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.p...@n5.nabble.com>,gm

Re: [SQL] Usage of function retruning record in query

2011-07-04 Thread lists-pgsql
Never mind, turns out you can do it with the array subscript operator. I stumbled on to this by chance. I don't know if this is in the documentation somewhere and I perhaps missed it? On Mon, Jul 04, 2011 at 02:31:52PM -0400, lists-pg...@useunix.net wrote: > Sorry, I don't have a useful answer but