It is version 8.2.1. But I realized my error was quite silly. The
intermittent problem was that the expression evaluator in my debugger
had the expressions "rs.first()", "rs.next()" etc. So the moment the
code hit my breakpoint the expressions were invoked which broke the
result set before my code got a chance to use it. I didn't see this
because the expression window was minimized :(
Now it's working great.
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of A.M.
Sent: Tuesday, March 06, 2007 4:34 PM
To: PostgreSQL JDBC List
Subject: Re: [JDBC] Fetching generated keys
On Mar 6, 2007, at 18:35 , Mike Clements wrote:
> Kris,
>
> I wrote a simple test program and schema but I can't reliably
> reproduce the problem. The problem I'm seeing is intermittent. When
> calling
> next()
> on the result set, it sometimes throws an exception saying the DB
> connection has been closed. Of course it hasn't been closed, but the
> problem is now so intermittent I can't reliably reproduce it.
>
> If I end up being able to reproduce it consistently I'll post the
> sample code.
You may be crashing the server. Which server version is this?
-M
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster