Re: TODO items for window functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TODO items for window functions
Дата
Msg-id 10133.1230574772@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TODO items for window functions  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Ответы Re: TODO items for window functions
Список pgsql-hackers
"Hitoshi Harada" <umi.tanuki@gmail.com> writes:
> 2008/12/30 Tom Lane <tgl@sss.pgh.pa.us>:
>> What is the difference?  AFAICS the RANGE and ROWS keywords ought to be
>> equivalent if you are not specifying "expression PRECEDING" or
>> "expression FOLLOWING".

> The difference is that RANGE ... CURRENT ROW contains all peers of the
> current row, while ROWS ... CURRENT ROW doesn't contain them but the
> current row itself only. See 7.11 rule 5-b.

Hah, I had missed that fine point.  Okay, doc is wrong and I will fix.

Given that, I think that a suitable minimum implementation should cover
both the RANGE/ROWS distinction and the CURRENT ROW/UNBOUNDED FOLLOWING
distinction, ie I would like 8.4 to support
RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROWRANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWINGROWS BETWEEN
UNBOUNDEDPRECEDING AND CURRENT ROWROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
 

(1 is the default, 2 and 4 behave the same unless I'm still missing
something.)  This doesn't seem too difficult to consider adding now,
and it will greatly increase the usefulness of frame-dependent
window functions.

Is this something you're interested in working on?  I can tackle it
if you don't have time now.
        regards, tom lane


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

Предыдущее
От: "Hitoshi Harada"
Дата:
Сообщение: Re: TODO items for window functions
Следующее
От: "Hitoshi Harada"
Дата:
Сообщение: Re: TODO items for window functions