Thread: xactisolevel --- ehh?

xactisolevel --- ehh?

From
Tomisław Kityński
Date:
Hello,

I've just switched from 7.2 to 7.3 and I get this exception:

java.sql.SQLException: ERROR:  Option 'xactisolevel' is not recognized

  at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
  at org.postgresql.Connection.ExecSQL(Connection.java:398)
  at org.postgresql.Connection.ExecSQL(Connection.java:381)
  at org.postgresql.Connection.getTransactionIsolation(Connection.java:921)
  at pl.e11.dbo.Storable.create(Storable.java:1119)
  ...

As you can see in stack trace, the exception is being thrown while getting
transaction isolation level; the line 1119 is:

 int ti = cn.getTransactionIsolation();

Of course it worked earlier, troubleless. I don't know if this is 7.3
related problem (by 7.3 i mean both psql and jdbc drivers); i don't actually
know what xactisolevel is --- does anyone has any suggestion about how to
solve this? Thank you very much in advance 8)

Tomek.


Re: xactisolevel --- ehh?

From
Barry Lind
Date:
You aren't running the 7.3 driver.

In the 7.2 driver the code issues the command:

show xactisolevel

In the 7.3 driver it uses:

show transaction isolation level

The old form (xactisolevel) was removed in 7.3 of the server.  However
both 7.2 and 7.3 support the newer form thus a 7.3 driver works fine
against a 7.2 database.

thanks,
--Barry


Tomisław Kityński wrote:
> Hello,
>
> I've just switched from 7.2 to 7.3 and I get this exception:
>
> java.sql.SQLException: ERROR:  Option 'xactisolevel' is not recognized
>
>   at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
>   at org.postgresql.Connection.ExecSQL(Connection.java:398)
>   at org.postgresql.Connection.ExecSQL(Connection.java:381)
>   at org.postgresql.Connection.getTransactionIsolation(Connection.java:921)
>   at pl.e11.dbo.Storable.create(Storable.java:1119)
>   ...
>
> As you can see in stack trace, the exception is being thrown while getting
> transaction isolation level; the line 1119 is:
>
>  int ti = cn.getTransactionIsolation();
>
> Of course it worked earlier, troubleless. I don't know if this is 7.3
> related problem (by 7.3 i mean both psql and jdbc drivers); i don't actually
> know what xactisolevel is --- does anyone has any suggestion about how to
> solve this? Thank you very much in advance 8)
>
> Tomek.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>