Re: Cause of intermittent rangetypes regression test failures

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cause of intermittent rangetypes regression test failures
Дата
Msg-id 24134.1321276276@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cause of intermittent rangetypes regression test failures  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Cause of intermittent rangetypes regression test failures  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> On Sun, 2011-11-13 at 15:38 -0500, Tom Lane wrote:
>> I think this demonstrates that the current definition of range_before is
>> broken.  It is not reasonable for it to throw an error on a perfectly
>> valid input ... at least, not unless you'd like to mark it VOLATILE so
>> that the planner will not risk calling it.
>> 
>> What shall we have it do instead?

> We could have it return NULL, I suppose. I was worried that that would
> lead to confusion between NULL and the empty range, but it might be
> better than marking it VOLATILE.

It needs to return FALSE, actually.  After further reading I realized
that you have that behavior hard-wired into the range GiST routines,
and it's silly to make the stand-alone versions of the function act
differently.

This doesn't seem terribly unreasonable: we just have to document
that the empty range is neither before nor after any other range.
        regards, tom lane


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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: FDW system columns
Следующее
От: Thom Brown
Дата:
Сообщение: Re: (PATCH) Adding CORRESPONDING to Set Operations