Re: Saner interval hash function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Saner interval hash function
Дата
Msg-id 18770.1238858184@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Saner interval hash function  (Greg Stark <stark@enterprisedb.com>)
Ответы Re: Saner interval hash function  (Greg Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Greg Stark <stark@enterprisedb.com> writes:
> On Fri, Apr 3, 2009 at 10:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The present implementation of interval_hash() is very carefully designed
>> and coded ... to meet the wrong specification :-(. What it should
>> be doing is producing equal hashcodes for values that interval_eq()
>> considers equal. The error is exhibited in the recent bug report #4748.

> It would be nice if we had a way to generate a lot of similar values
> for a every data type. Then we could have a regression test which
> checks for each data type that the hash function matches the equality
> operator -- and for that matter that the various inequality operators
> are also consistent.

> I'm not sure how to generate values though. For a lot of data types it
> would be hard to generate values densely enough to trigger any bugs.

Yeah.  I did add a regression test for the specific case of '30 days'
vs '1 month', which we know is a pain point for this particular data
type.  Generating values at random doesn't seem like it's really likely
to teach us much though.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: GetCurrentVirtualXIDs()
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Saner interval hash function