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

From: Oliver Ford <ojford(at)gmail(dot)com>
To: Erikjan Rijkers <er(at)xs4all(dot)nl>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add RANGE with values and exclusions clauses to the Window Functions
Date: 2017-11-27 15:01:06
Message-ID: CAGMVOdvrZCwJg0BngM9GMO+LK=j20vhSfdk1gTTBNNH311Vgsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 27, 2017 at 12:06 PM, Oliver Ford <ojford(at)gmail(dot)com> wrote:
> On Fri, Nov 24, 2017 at 3:08 PM, Erikjan Rijkers <er(at)xs4all(dot)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.

Sorry previous patch was in full-commit form and not just a diff.
Attached is it in bare diff form.

Attachment Content-Type Size
0001-window-frame-v3.patch application/octet-stream 78.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2017-11-27 15:11:39 Re: [HACKERS] Refactoring identifier checks to consistently use strcmp
Previous Message David Steele 2017-11-27 14:06:23 Re: [HACKERS] Timeline ID in backup_label file