Re: return MAX and when it happened

Поиск
Список
Период
Сортировка
От Scara Maccai
Тема Re: return MAX and when it happened
Дата
Msg-id 49256D31.7050204@yahoo.it
обсуждение исходный текст
Ответ на Re: return MAX and when it happened  (Sam Mason <sam@samason.me.uk>)
Список 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.





В списке pgsql-general по дате отправления:

Предыдущее
От: WireSpot
Дата:
Сообщение: Re: join with redundant results VS simpler join plus multiple selects
Следующее
От: WireSpot
Дата:
Сообщение: Re: Prepared statement already exists