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

Re: function returning a row

From: Kjetil Haaland <kjetil(dot)haaland(at)student(dot)uib(dot)no>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-novice(at)postgresql(dot)org
Subject: Re: function returning a row
Date: 2005-02-14 09:08:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi again

Thanks a lot! That was the hole problem. Was using an old function that i was 
extending to return a set, and had forgoten that part. Now it works!


On Friday 11 February 2005 11:09, Michael Fuhr wrote:
> On Thu, Feb 10, 2005 at 01:16:37PM +0100, Kjetil Haaland wrote:
> > I have tested my function some more and found out that it is while i am
> > trying to return it crashes. If i use a standard type like float it
> > works, but with my own type alignres it doesn't. I have used this type as
> > return value in other functions before, but not in set returning
> > functions.
> I was just looking at the code you posted here:
> About 20 lines above the call to SRF_RETURN_NEXT(), you allocate
> memory and assign it to "result", but then you never do anything
> with that variable before trying to return it.  It probably contains
> garbage, which could be a problem if it's a variable-length type
> since the first 4 bytes are supposed to contain the length of
> the data.

In response to

pgsql-novice by date

Next:From: Rodolfo J. PaizDate: 2005-02-14 18:45:01
Subject: Re: Converting interval to numeric?
Previous:From: Les CarterDate: 2005-02-14 06:54:51
Subject: export/import from one schema to another?

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