[Fwd: Re: return MAX and when it happened]

From: Scara Maccai <m_lists(at)yahoo(dot)it>
To: postgresql <pgsql-general(at)postgresql(dot)org>
Subject: [Fwd: Re: return MAX and when it happened]
Date: 2008-11-21 14:48:44
Message-ID: 4926CA4C.9030702@yahoo.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can someone answer me? Or do I have to ask this in the hackers list?

I don't get from the docs: do I have to call

get_call_result_type(fcinfo, NULL, &tupdesc)

every time?

I mean: the only example I've found about returning Composite Types
talks about returning sets as well (34.9.10. Returning Sets). In that
example the get_call_result_type call is done once:

if (SRF_IS_FIRSTCALL())
{
[...]
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
[...]
}

Should I do something like that in my function or that only applies to
function returning sets?
I'm calling it every time now but I don't know if it's right...

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-11-21 14:49:34 Re: Using Postgres to store high volume streams of sensor readings
Previous Message Pavel Stehule 2008-11-21 14:43:39 Re: Returning schema name with table name