Re: Cursornames - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: Cursornames
Date
Msg-id 3F309805.9020602@xythos.com
Whole thread Raw
In response to Cursornames  (Kim Ho <kho@redhat.com>)
List pgsql-jdbc
Patch applied.

thanks,
--Barry

PS.  I would still like the mentioned addition to the test suite to
check for this case.

Kim Ho wrote:
> This fixes the behaviour that Felipe Schnack noticed.
>
> The logic goes, if the statement name is null (which happens when you do
> not use cursors or server prepared statements), then we have already
> fetched all the rows, and there are no more.
>
> Cheers,
>
> Kim
>
>
> ------------------------------------------------------------------------
>
> Index: org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java,v
> retrieving revision 1.13
> diff -c -p -r1.13 AbstractJdbc1ResultSet.java
> *** org/postgresql/jdbc1/AbstractJdbc1ResultSet.java    30 Jun 2003 21:10:55 -0000    1.13
> --- org/postgresql/jdbc1/AbstractJdbc1ResultSet.java    4 Aug 2003 21:32:11 -0000
> *************** public abstract class AbstractJdbc1Resul
> *** 131,136 ****
> --- 131,138 ----
>               String[] binds = new String[0];
>               // Is this the correct query???
>               String cursorName = statement.getStatementName();
> +             if (cursorName == null)
> +                 return false;
>               sql[0] = "FETCH FORWARD " + fetchSize + " FROM " + cursorName;
>               QueryExecutor.execute(sql,
>                                     binds,
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly



pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: [HACKERS] PostgreSQL JDBC driver Connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE)
Next
From: felipes@ritterdosreis.br
Date:
Subject: Re: setFetchSize() bug