Re: getTransactionIsolation() causes SQLException - unrecognized

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: getTransactionIsolation() causes SQLException - unrecognized
Дата
Msg-id 4251D4EC.9070204@opencloud.com
обсуждение исходный текст
Ответ на getTransactionIsolation() causes SQLException - unrecognized configuration parameter xactisolevel  (Paul Marchant <pmarchant@gmail.com>)
Список pgsql-jdbc
Paul Marchant wrote:
> Setup: Postgres 8.0.1 & postgresql-8.0-310.jdbc3.jar

> java.sql.SQLException: ERROR:  unrecognized configuration parameter
> "xactisolevel"

I can't reproduce this against 8.0.0. 'xactisolevel' doesn't appear
anywhere in the current JDBC driver sources either (from memory it was
around in the 7.3 driver though)..  Are you sure you are using the
driver version you think you are using?

Test code attached. I get this:

> $ java -cp .:postgresql-8.0-310.jdbc3.jar TestIso 'jdbc:postgresql://localhost:5800/test?user=oliver'
> driver version: PostgreSQL 8.0 JDBC3 with SSL (build 310)
> db version:     8.0.0
> con.getTransactionIsolation() = 2

-O
import java.sql.*;

public class TestIso {
    public static void main(String[] args) {
        try {
            Class.forName("org.postgresql.Driver");
        } catch (ClassNotFoundException e) {
            System.out.println(e);
        }

        Connection con;
        try {
            con = DriverManager.getConnection(args[0]);

            System.out.println("driver version: " + con.getMetaData().getDriverVersion());
            System.out.println("db version:     " + con.getMetaData().getDatabaseProductVersion());

            System.out.println("con.getTransactionIsolation() = " +
                               con.getTransactionIsolation());
            con.close();
        } catch (SQLException e) {
            System.out.println(e);
        }
    }
}

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: getTransactionIsolation() causes SQLException - unrecognized
Следующее
От: Andrew Lazarus
Дата:
Сообщение: Re: JBuilder Question