Re: BUG #8144: Problem with rank window function and CTEs

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: BUG #8144: Problem with rank window function and CTEs
Дата
в 03:29:04
Msg-id
21696.1368156530@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #8144: Problem with rank window function and CTEs marc@bloodnok.com
Re: BUG #8144: Problem with rank window function and CTEs Tom Lane <tgl@sss.pgh.pa.us>
marc@bloodnok.com writes:
> I have a query in which I want to use the result of a window function to
> isolate the most relevant results.   While I was trying to develop and test
> the query, I discovered what looks like a bug in the results of the rank()
> function.  This has been tried with the same results on 9.1.9 and 9.2.4

Well, you didn't provide enough information for somebody else to
reproduce the problem, but just looking at this I see no particular
reason to think there's a bug.  In the first case, the
"where ao.org_id = 20150" clause filters rows before the rank() is
taken, whereas in the second case it filters after the rank() function.
I think the larger rank values indicate that there are other rows with
different org_id but the same item_id, which you won't see in the final
output in either case --- but in the second query, the rank() function
does see them.

			regards, tom lane
В списке pgsql-bugs по дате отправления
От: Sergey Konoplev
Дата:
От: Karsten Düsterloh
Дата:
Сообщение: Strange time zone +00:53:28
FAQ