Re: strange evaluation Window function and SRF functions?

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: strange evaluation Window function and SRF functions?
Дата
Msg-id CAFj8pRC8CTTQCFOrk0q2xpL57huVsi_BKkDV_UxbcWAqw5zofw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: strange evaluation Window function and SRF functions?  (Thom Brown <thom@linux.com>)
Ответы Re: strange evaluation Window function and SRF functions?  (Josh Berkus <josh@agliodbs.com>)
Re: strange evaluation Window function and SRF functions?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers


2012/7/30 Thom Brown <thom@linux.com>
On 30 July 2012 17:19, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello

I seen nice trick based on window function http://stackoverflow.com/questions/11700930/how-can-i-trim-a-text-array-in-postgresql

but isn't it example of wrong evaluation? Result of row_number is not correct

Looks right to me.  I guess the way to get the row_number they're after out of the result set would involve changing OVER () to OVER (ORDER BY unnest(myTextArrayColumn))


it looks like row_number is evaluated before SRF - this behave is absolutely undefined - for me - more native behave is different evaluation.

Regards

Pavel

 
--
Thom

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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: strange evaluation Window function and SRF functions?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: strange evaluation Window function and SRF functions?