Re: BUG #9010: partition by overrides order by in window functions

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: BUG #9010: partition by overrides order by in window functions
Дата
Msg-id 1390948477557-5789377.post@n5.nabble.com
обсуждение исходный текст
Ответ на BUG #9010: partition by overrides order by in window functions  (markella.skempri@onzo.com)
Список pgsql-bugs
markella.skempri wrote
> 1    2011-08-20    2011-08-21    1
> 1    2011-08-21    2011-08-27    6
> 1    2011-08-27    2011-08-28    1
> 1    2011-08-28    2011-08-29    1
> 1    2011-08-29    2011-08-30    1
>
> 1    2011-08-20    2011-08-21    1
> 1    2011-08-27    2011-08-28    1    7
> 1    2011-08-21    2011-08-27    6    1
> 1    2011-08-28    2011-08-29    1    1
> 1    2011-08-29    2011-08-30    1    2

Yes, partitioning occurs before ordering.  The syntax itself suggests that.

Can you explain why you expect the 27-28 row to belong to the "first" group
and not the "third"?

If that is a typo then you are looking for contiguous blocks with the same
gap-size.  Once you've identified those blocks you can then partition on
them and performing your row_number.

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-9010-partition-by-overrides-order-by-in-window-functions-tp5789343p5789377.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #9010: partition by overrides order by in window functions
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: BUG #8984: ERROR: t_xmin is uncommitted in tuple to be updated