Re: TODO items for window functions

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Re: TODO items for window functions
Дата
Msg-id e08cc0400812290954ud2650e0sd45f9e566e9fbcfb@mail.gmail.com
обсуждение исходный текст
Ответ на Re: TODO items for window functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: TODO items for window functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2008/12/30 Tom Lane <tgl@sss.pgh.pa.us>:
> "Hitoshi Harada" <umi.tanuki@gmail.com> writes:
>> And surveying sgml docs, I found this is not correct.
>
>> http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select.sgml?r1=1.112&r2=1.113
>
>> +     default framing behavior, which is equivalent to the framing clause
>> +     <literal>ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW</>.
>
>> the default frame with ORDER BY clause is RANGE BETWEEN UNBOUNDED
>> PRECEDING AND CURRENT ROW, as aggregates perform rows peer to the
>> current row.
>
> 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.


Regards,


-- 
Hitoshi Harada


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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: ecpg regression test failures caused by window functions patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TODO items for window functions