Re: Allow WindowFuncs prosupport function to use more optimal WindowClause options - Mailing list pgsql-hackers

From David Rowley
Subject Re: Allow WindowFuncs prosupport function to use more optimal WindowClause options
Date
Msg-id CAApHDvqkYaPnfRkE+gdme0wVZiyFsJQYgZx=T15+5_qySjwfnw@mail.gmail.com
Whole thread Raw
In response to Re: Allow WindowFuncs prosupport function to use more optimal WindowClause options  (Zhihong Yu <zyu@yugabyte.com>)
Responses Re: Allow WindowFuncs prosupport function to use more optimal WindowClause options  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
Thanks for having a look at this.

On Fri, 14 Oct 2022 at 10:52, Zhihong Yu <zyu@yugabyte.com> wrote:
> +       req->frameOptions = (FRAMEOPTION_ROWS |
> +                            FRAMEOPTION_START_UNBOUNDED_PRECEDING |
> +                            FRAMEOPTION_END_CURRENT_ROW);
>
> The bit combination appears multiple times in the patch.
> Maybe define the combination as a constant in supportnodes.h and reference it in the code.

I don't believe supportnodes.h has any business having any code that's
related to actual implementations of the support request type.  If we
were to have such a definition then I think it would belong in
windowfuncs.c.  I'd rather see each implementation of the support
request spell out exactly what they mean, which is what the patch does
already.

David



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Warning about using pg_stat_reset() and pg_stat_reset_shared()
Next
From: Richard Guo
Date:
Subject: Re: havingQual vs hasHavingQual buglets