On Tue, Dec 5, 2017 at 11:12 PM, Erik Rijkers <er@xs4all.nl> wrote:
> On 2017-11-27 17:55, Oliver Ford wrote:
>>
>> Cheers here's v4 with the correct docs.
>
>
> This email just to link related thread "Add GROUPS option to the Window
> Functions":
>
> https://www.postgresql.org/message-id/CAGMVOdtWkb9X7dUh7vjaCaiH34UGFg88unXYTEOub0Rk0swSXw%40mail.gmail.com
>
>
>
>
After further testing I found that some functions were returning
incorrect values with the new options. The attached patch calculates
the frame head and tail correctly, and in RANGE mode checks for the
sort key being null. The rule I've followed is that a null is out of
range of any other value, including another null.
I've merged the RANGE and GROUPS patches into one as these fixes touch
similar bits of code. So the attached patch will give full window
frame clause support.