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

From David G. Johnston
Subject Re: Add RANGE with values and exclusions clauses to the Window Functions
Date
Msg-id CAKFQuwbiM7TsopVvwQ59fgg31rFhNXxbgpSPRD72ASkehzCkcQ@mail.gmail.com
Whole thread Raw
In response to Re: Add RANGE with values and exclusions clauses to the Window Functions  (Oliver Ford <ojford@gmail.com>)
Responses Re: Add RANGE with values and exclusions clauses to the Window Functions
List pgsql-hackers
On Fri, Feb 2, 2018 at 9:26 AM, Oliver Ford <ojford@gmail.com> wrote:
On Thu, Feb 1, 2018 at 1:46 AM, David G. Johnston
<david.g.johnston@gmail.com> wrote:

> The three callers of WinGetFuncArgInFrame don't use the isout argument; they
> probably need to read that and a new isexcluded argument.  Start at the
> head, loop until isout = true || isexcluded = false.

The patch takes a slightly different approach and puts the logic in
WinGetFuncArgInFrame.
The "row_is_in_frame" function now returns a specific return code for
when an Exclude
clause was matched.

​I would suggest adding constants for the 4 possible results from row_is_in_frame.

David J.

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Temporary tables prevent autovacuum, leading to XID wraparound
Next
From: Oliver Ford
Date:
Subject: Re: Add RANGE with values and exclusions clauses to the Window Functions