Talking about cursors, please, someone can explain me why I can't use setFetchSize() using the CVS version of the
JDBCdriver? I get the following error. There are no problem in the SQL query I'm sending to the backend, if I don't use
setFecthSize()everything runs fine.
java.sql.SQLException: ERROR: parser: parse error at or near "null" at character 23
at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:286)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:104)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:66)
at org.postgresql.jdbc1.AbstractJdbc1ResultSet.next(AbstractJdbc1ResultSet.java:135)
at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:135)
On Mon, 04 Aug 2003 10:05:40 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> The application is returning 300,000 records in some SELECT clause (a
> >> ResultSet) this finish the client's JVM memory, so my solution to this
> >> was to use the SELECT's LIMIT clause returning 600 records and making
> >> the internal logic that when the user gets past the 600th record the
> >> application automatically issues another query with LIMIT and OFFSET
> >> clauses causing a little delay but this is better than finishing the
> >> memory in the client's machine (if you know a better solution or have
> >> some advices, please let me know).
>
> I'm surprised no one has yet suggested using a cursor.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
/~\ The ASCII Felipe Schnack (felipes@ritterdosreis.br)
\ / Ribbon Campaign Analista de Sistemas
X Against HTML Cel.: 51-91287530
/ \ Email! Linux Counter #281893
Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@ritterdosreis.br
Fone: 51-32303341