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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-novice(at)postgresql(dot)org
Subject: Re: function returning a row
Date: 2005-02-10 12:16:37
Message-ID: 200502101316.37463.kjetil.haaland@student.uib.no (view raw or flat)
Thread:
Lists: pgsql-novice
hello

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.

When returning a float value, SRF_RETURN_NEXT(funcctx, Float8GetDatum(result)) 
is used. What am i supposed to use for my own type to get the datum value? I 
have tried using PointerGetDatum(result) but then the function crashes.

regards
Kjetil

In response to

Responses

pgsql-novice by date

Next:From: Van Ingen, LaneDate: 2005-02-10 18:53:42
Subject: PL/pgSQL: FOT Loops vs Cursors
Previous:From: AkbarDate: 2005-02-10 12:00:14
Subject: how to know this row has been referenced or not????

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