Skip site navigation (1) Skip section navigation (2)

Re: C Function returning a tuple with a float4 array as column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim <tim(dot)child(at)comcast(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: C Function returning a tuple with a float4 array as column
Date: 2010-12-05 21:03:28
Message-ID: 515.1291583008@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
I wrote:
> ... But what seems likely to be the problem is that
> you've declared the function to return set (that's implied by the
> RETURNS TABLE syntax) but not coded it to do any such thing.  I'm
> guessing some piece of code is confused by the function's failure to
> follow the SRF API.

No, scratch that: the problem is with that syntax, but in the columns
direction not the rows direction.  Since you've only got one column,
the TABLE syntax degenerates to one OUT param, which is treated as
though it were just the normal function result.  IOW, this function
shouldn't be returning a tuple at all, but just the array datum.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Machiel RichardsDate: 2010-12-06 09:02:57
Subject: Duplicate data within tables
Previous:From: Tom LaneDate: 2010-12-05 20:43:19
Subject: Re: C Function returning a tuple with a float4 array as column

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group