Search Postgresql Archives

howto determine rows count to be returned by DECLARE ... SELECT ...

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

 



Dear Community,
I'm working on implementation of virtual grid using DECLARE... SELECT.... Advantage of virtual grid is that it loads only rows that a user is willing to see (with FETCH).
 
However, it is not clear how to determine max rows count that the cursor can return. The count is necessary for two purposes: render scrollbar and support jumping to the last rows in the grid.
 
The only obvious solution is to execute SELECT COUNT(1) ... before declaring the cursor.
 
Is there a better solution?
 
Can the cursor return total rows count or is there a way to position cursor to the last row? (Then the number of roundtrips to server can be less by 1 and virtual grid can render last rows in reverse order).
 
Thank you,
K.

[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