Re: Unpredicatable behavior of volatile functions used

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unpredicatable behavior of volatile functions used
Дата
Msg-id 16491.1168878462@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Unpredicatable behavior of volatile functions used  (Aleksander Kmetec <aleksander.kmetec@intera.si>)
Ответы Re: Unpredicatable behavior of volatile functions used  (Aleksander Kmetec <aleksander.kmetec@intera.si>)
Список pgsql-general
Aleksander Kmetec <aleksander.kmetec@intera.si> writes:
> Some quick testing shows that util.row_number() only gets re-evaluated at every call if the subquery contains an
ORDER 
> BY clause. Now we can predict whether we need to compensate for that just by looking at the original query.

If you're going to use a cursor, I don't understand why you don't just
MOVE FORWARD ALL and look at the returned rowcount to determine how
many rows in the query.  This won't be any more expensive than fetching
the last row ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Glacially slow nested SELECT
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Avoiding empty queries in tsearch