Re: Add RANGE with values and exclusions clauses to the Window Functions

Поиск
Список
Период
Сортировка
От Oliver Ford
Тема Re: Add RANGE with values and exclusions clauses to the Window Functions
Дата
Msg-id CAGMVOdtGe=30u6D2WqwvWchE+-yNb9jKnEeG8BHyw7jHiGPR7w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add RANGE with values and exclusions clauses to the WindowFunctions  (Erik Rijkers <er@xs4all.nl>)
Ответы Re: Add RANGE with values and exclusions clauses to the WindowFunctions
Re: Add RANGE with values and exclusions clauses to the Window Functions
Список pgsql-hackers
On Sat, Jan 27, 2018 at 7:40 AM, Erik Rijkers <er@xs4all.nl> wrote:
> On 2018-01-27 00:35, Oliver Ford wrote:
>>
>> Attached patch implements an extensible version of the RANGE with
>> values clause. It doesn't actually add any more type support than was
>
> [...]
>>
>> I've tested that the existing regression tests in previous versions
>> still pass, and also added new tests for descending mode.
>>
>> [0001-window-frame-v7.patch]
>
>
> Hi,
>
> Regression tests only succeed for assert-disabled compiles; they fail when
> assert-enabled:
>
> I used (Centos 6.9):

Could you please try the attached version? It works for me with asserts enabled.

Problem seems to be with an existing Assert in catcache.c:1545:

Assert(nkeys > 0 && nkeys < cache->cc_nkeys);

The "<" needs to be "<=" (and is changed in the attached patch).
AFAICT this was never a problem before purely because no code before
this patch called SearchSysCacheList4, so they always called with
fewer keys than the number available. But it's surely correct to
assert that the number of keys supplied is less than or equal to, not
less than, the number of keys in the cache.

Вложения

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

Предыдущее
От: Ildar Musin
Дата:
Сообщение: Re: General purpose hashing func in pgbench
Следующее
От: Erik Rijkers
Дата:
Сообщение: Re: Add RANGE with values and exclusions clauses to the WindowFunctions