Search Postgresql Archives

Re: Unpredicatable behavior of volatile functions used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aleksander Kmetec <aleksander.kmetec@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux