From: | Scara Maccai <m_lists(at)yahoo(dot)it> |
---|---|
To: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: return MAX and when it happened |
Date: | 2008-11-20 13:59:13 |
Message-ID: | 49256D31.7050204@yahoo.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sam Mason wrote:
> On Wed, Nov 19, 2008 at 05:06:14PM -0600, Scara Maccai wrote:
>
>> I think I wrote it, but there's something I don't get from the docs: do
>> I have to call
>>
>> get_call_result_type(fcinfo, NULL, &tupdesc)
>>
>
> I've always tried to stay away from C level extensions so far! How
> many records are you expecting to aggregate across? If it's only a few
> thousand a simple SQL language function may be ok:
>
It's going to be used in millions of records.
That's why I went straight to the C implementation. But your SQL
function is a lot easier to read.
> Sorry I can't be of more help!
>
You helped me a lot, thank you.
Anyone can answer me?
Do I have to call
get_call_result_type
every time or I can just call it the first time? I don't think the docs
are very clear in case of a function returning 1 Composite Type.
From | Date | Subject | |
---|---|---|---|
Next Message | WireSpot | 2008-11-20 14:03:08 | Re: Prepared statement already exists |
Previous Message | Sabin Coanda | 2008-11-20 13:57:04 | on error logs the whole multiline script |