8.4, 9.0 bug (doesn't exist in 9.1) related to window functions

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема 8.4, 9.0 bug (doesn't exist in 9.1) related to window functions
Дата
Msg-id 1327622791.14650.8.camel@sussancws0025
обсуждение исходный текст
Ответы Re: 8.4, 9.0 bug (doesn't exist in 9.1) related to window functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
In REL8_4_STABLE and REL9_0_STABLE:

=> select ntile(3) OVER ( ORDER BY CASE WHEN count(i) = 0 THEN NULL ELSE
count(i) END asc ) from ( SELECT NULL::integer as i limit 0 ) s ;
ERROR:  cannot extract attribute from empty tuple slot

A different error appears in 9.1.0 ("could not find pathkey item to
sort"), but it's fixed sometime later in the 9.1 series.

If you get rid of the CASE statement, then it still fails in 8.4 and
9.0, but it succeeds in 9.1.0 and beyond.

Regards,
    Jeff Davis

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Doc-bug; minor typo in auto_explain documentation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 8.4, 9.0 bug (doesn't exist in 9.1) related to window functions