Re: Add RANGE with values and exclusions clauses to the Window Functions - Mailing list pgsql-hackers

From Oliver Ford
Subject Re: Add RANGE with values and exclusions clauses to the Window Functions
Date
Msg-id CAGMVOdsopg5ZAuJh9+ceq-s0pU2qqZsZn-jbL4A1c=h1iWaZVA@mail.gmail.com
Whole thread Raw
In response to Re: Add RANGE with values and exclusions clauses to the WindowFunctions  (Erikjan Rijkers <er@xs4all.nl>)
Responses Re: Add RANGE with values and exclusions clauses to the Window Functions  (Oliver Ford <ojford@gmail.com>)
List pgsql-hackers
On Fri, Nov 24, 2017 at 3:08 PM, Erikjan Rijkers <er@xs4all.nl> wrote:
>   SELECT pg_get_viewdef('v_window');
> !                 pg_get_viewdef
> ! ----------------------------------------------
> !   SELECT i.i,                                +
> !      sum(i.i) OVER (ORDER BY i.i) AS sum_rows+
>       FROM generate_series(1, 10) i(i);
>   (1 row)
>
> --- 1034,1043 ----
>   (10 rows)
>
>   SELECT pg_get_viewdef('v_window');
> !                                     pg_get_viewdef
> !
> ---------------------------------------------------------------------------------------
> !   SELECT i.i,
> +
> !      sum(i.i) OVER (ORDER BY i.i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
> AS sum_rows+
>       FROM generate_series(1, 10) i(i);
>   (1 row)
>
>
> This small hickup didn't prevent building an instance but obviously I
> haven't done any real tests yet.
>
>
> thanks,
>
>
> Erik Rijkers

After another clone and rebuild it works alright with the correct
spacing on mine, so the attached v2 should all pass. I noticed that I
hadn't added the exclusions clauses to the view defs code, so that's
also in this patch with extra tests to cover it.

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: explain analyze output with parallel workers - question aboutmeaning of information for explain.depesz.com
Next
From: Юрий Соколов
Date:
Subject: Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA