Re: [Erserver-general] Why does Statement.close() close result - Mailing list pgsql-jdbc

From Jan Wieck
Subject Re: [Erserver-general] Why does Statement.close() close result
Date
Msg-id 3F8D3C73.60101@Yahoo.com
Whole thread Raw
In response to Re: [Erserver-general] Why does Statement.close() close result  (Barry Lind <blind@xythos.com>)
List pgsql-jdbc
Barry Lind wrote:

> Jan Wieck wrote:
>> How is the automatic cursor code controlled by setFetchSize() affected
>> by a Statement.close() before the result set is consumed? Does that need
>> to use holdable cursors here because in turn the transaction around the
>> cursor could end sooner than expected?
>>
>>
>> Jan
>>
>
> This is an interesting question.  The current logic for cursor backed
> result sets will error if you try to access the result set after a
> commit/rollback (actually you will get an error when you exhaust the
> already fetched values that are in memory and try to fetch more from the
> database).

Only >= 7.4. Everything before just gives a NOTICE but otherwise just
returns "FETCH 0" or "CLOSE" as if the cursor would exist. It does that
even for cursors that have never been declared.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: [Erserver-general] Why does Statement.close() close result
Next
From: rajiv@altec.org
Date:
Subject: Inserts disappear after some time under high load