Re: Collect frequency statistics for arrays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Collect frequency statistics for arrays
Дата
Msg-id 4826.1330893697@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Collect frequency statistics for arrays  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: Collect frequency statistics for arrays
Список pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes:
> On Sun, Mar 4, 2012 at 5:38 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 1. I'm still unhappy about the loop that fills the count histogram,
>> as I noted earlier today.  It at least needs a decent comment and some
>> overflow protection, and I'm not entirely convinced that it doesn't have
>> more bugs than the overflow issue.

> Attached patch is focused on fixing this. The "frac" variable overflow is
> evaded by making it int64. I hope comments is clarifying something. In
> general this loop copies behaviour of histogram constructing loop of
> compute_scalar_stats function. But instead of values array we've array of
> unique DEC and it's frequency.

OK, I reworked this a bit and committed it.  Thanks.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Our regex vs. POSIX on "longest match"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Collect frequency statistics for arrays