Re: SET TRANSACTION ISOLATION LEVEL

From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: "'Philip Crotwell'" <crotwell(at)seis(dot)sc(dot)edu>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: SET TRANSACTION ISOLATION LEVEL
Date: 2002-02-25 14:15:15
Message-ID: 013501c1be06$d8a9c350$8201a8c0@inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Philip,

It would be useful to see the rest of your code. It is hard to determine
what is going on.

Dave

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Philip Crotwell
Sent: Friday, February 22, 2002 2:54 PM
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] SET TRANSACTION ISOLATION LEVEL

Hi

I got this error, it isn't the first transaction since the server was
started, so I don't understant what it means. The docs seem to suggest
that the READ COMMITTED level is default. If there is a default, why do
I need to set it?

I am AFAIK running single threaded in my java code, so I don't think I
would be dong two separate transactions in the same connection.

postgres 7.1. and this code involved is to get large objects, so it is
non-auto-commiting.

thanks,
PHilip

java.sql.SQLException: ERROR: SET TRANSACTION ISOLATION LEVEL must be
called be fore any query

at org.postgresql.Connection.ExecSQL(Connection.java:533)
at org.postgresql.Connection.ExecSQL(Connection.java:400)
at
org.postgresql.jdbc2.Connection.doIsolationLevel(Connection.java:412)
at org.postgresql.jdbc2.Connection.commit(Connection.java:226)
...

And from the server log:

NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'quit_pkey'
for tab le 'quit'
ERROR: Relation 'quit' already exists
ERROR: Relation 'plottable_cache_seq' already exists
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'quit_pkey'
for tab le 'quit'
ERROR: Relation 'quit' already exists
DEBUG: MoveOfflineLogs: remove 0000000C000000E4
pq_flush: send() failed: Broken pipe
pq_recvbuf: unexpected EOF on client connection
DEBUG: MoveOfflineLogs: remove 0000000C000000E5
ERROR: Relation 'event' does not exist
DEBUG: MoveOfflineLogs: remove 0000000C000000E6
NOTICE: BEGIN: already a transaction in progress
ERROR: SET TRANSACTION ISOLATION LEVEL must be called before any query
NOTICE: current transaction is aborted, queries ignored until end of
transactio n block
NOTICE: current transaction is aborted, queries ignored until end of
transactio n block
NOTICE: current transaction is aborted, queries ignored until end of
transactio n block
NOTICE: current transaction is aborted, queries ignored until end of
transactio n block
NOTICE: current transaction is aborted, queries ignored until end of
transactio n block
NOTICE: current transaction is aborted, queries ignored until end of
transactio n block

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Steven Murphy 2002-02-25 14:58:17 Re: Connection Problem with JDBC
Previous Message Dave Cramer 2002-02-25 14:12:44 Re: set parameter not enabled?