postgresql-jdbc.git / summary / log / commit / refs

commit    7a13caa8345b4069ab55304a29567aabdc3c1939
Author:   Kris Jurka <books@ejurka.com>
Date:     Thu Apr 22 08:09:34 2004 +0000

    Update tests to reflect the fact that the 7.5 server has been
    modified to return affected row counts when executing prepared
    statements.


org/postgresql/test/jdbc2/ServerPreparedStmtTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java b/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java index b363066e..2d30ee8d 100644 --- a/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java +++ b/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java @@ -49,10 +49,9 @@ public class ServerPreparedStmtTest extends TestCase PreparedStatement pstmt = con.prepareStatement("UPDATE testsps SET id = id + 44"); ((PGStatement)pstmt).setUseServerPrepare(true); int count = pstmt.executeUpdate(); - if (TestUtil.haveMinimumServerVersion(con,"7.3")) { + // Server versions 7.3 and 7.4 do not return the update count. + if (TestUtil.haveMinimumServerVersion(con,"7.3") && !TestUtil.haveMinimumServerVersion(con, "7.5")) { assertTrue(((PGStatement)pstmt).isUseServerPrepare()); - // Currently server prepared statements do not - // correctly return the update count. assertEquals(0, count); } else { assertEquals(6, count); [parent: d4b3242102f0]