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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add RANGE with values and exclusions clauses to the Window Functions
Дата
Msg-id 26389.1517981284@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add RANGE with values and exclusions clauses to the Window Functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> [ 0001-window-frame-v14.patch ]

Pushed after further hacking on the documentation and test cases.
I went ahead with the "value" to "offset" terminology change, too.

You mentioned upthread that you were interested in adding more in_range
support functions.  I think it'd be a great idea to get that done for v11,
because according to my reading of the SQL spec, it expects "RANGE offset
PRECEDING/FOLLOWING" to work for any numeric type.  See SQL:2011 7.11
<window clause> syntax rule 11-a-iii:

    iii) The declared type of [the sort column] shall be numeric,
    datetime, or interval. The declared type of [the offset] shall be
    numeric if the declared type of SK is numeric; otherwise, it shall
    be an interval type that ...

So we need in_range functions for float4, float8, and numeric if we
really want to claim with a straight face that we cover all of SQL:2011
here.  I think that ought to be a small enough addition to deal with in
the final v11 commitfest, if you have time to prepare a patch this
month.

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Cached/global query plans, autopreparation
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] proposal: schema variables