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

commit    ff9cff42e04d9f8634cb3e70d695d1a7364baaa9
Author:   Kris Jurka <books@ejurka.com>
Date:     Mon Jan 30 20:09:05 2006 +0000

    The fix for incorrect parameter indexes on CallableStatements that do not
    return values did not work for any JDK other than 1.4.  Make it work
    for the other builds by duplicating that code to the other
    CallableStatement implementors.


org/postgresql/jdbc2/Jdbc2CallableStatement.java | 6 ++++-- org/postgresql/jdbc3g/Jdbc3gCallableStatement.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/org/postgresql/jdbc2/Jdbc2CallableStatement.java b/org/postgresql/jdbc2/Jdbc2CallableStatement.java index df01e386..bc25bf12 100644 --- a/org/postgresql/jdbc2/Jdbc2CallableStatement.java +++ b/org/postgresql/jdbc2/Jdbc2CallableStatement.java @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005, PostgreSQL Global Development Group * * IDENTIFICATION -* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java,v 1.11 2005/01/11 08:25:46 jurka Exp $ +* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java,v 1.12 2005/07/08 17:38:30 davec Exp $ * *------------------------------------------------------------------------- */ @@ -24,7 +24,9 @@ class Jdbc2CallableStatement extends Jdbc2PreparedStatement implements CallableS super(connection, sql, true, rsType, rsConcurrency); if ( !connection.haveMinimumServerVersion("8.1") || connection.getProtocolVersion() == 2) { - adjustIndex = true; + // if there is no out parameter before the function determined by modifyJdbcCall then do not + // set adjustIndex to true + adjustIndex = outParmBeforeFunc; } } public void registerOutParameter( int parameterIndex, int sqlType ) throws SQLException diff --git a/org/postgresql/jdbc3g/Jdbc3gCallableStatement.java b/org/postgresql/jdbc3g/Jdbc3gCallableStatement.java index 5a8b22c9..6cf4a822 100644 --- a/org/postgresql/jdbc3g/Jdbc3gCallableStatement.java +++ b/org/postgresql/jdbc3g/Jdbc3gCallableStatement.java @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005, PostgreSQL Global Development Group * * IDENTIFICATION -* $PostgreSQL: pgjdbc/org/postgresql/jdbc3g/Jdbc3gCallableStatement.java,v 1.4 2005/01/11 08:25:47 jurka Exp $ +* $PostgreSQL: pgjdbc/org/postgresql/jdbc3g/Jdbc3gCallableStatement.java,v 1.5 2005/08/12 18:09:02 jurka Exp $ * *------------------------------------------------------------------------- */ @@ -19,7 +19,9 @@ class Jdbc3gCallableStatement extends Jdbc3gPreparedStatement implements Callabl super(connection, sql, true, rsType, rsConcurrency, rsHoldability); if ( !connection.haveMinimumServerVersion("8.1") || connection.getProtocolVersion() == 2) { - adjustIndex = true; + // if there is no out parameter before the function determined by modifyJdbcCall then do not + // set adjustIndex to true + adjustIndex = outParmBeforeFunc; } } [parent: 4c519585aa5a]