From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Barry Lind <blind(at)xythos(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-jdbc(at)postgresql(dot)org, erserver-general(at)svr3(dot)postgresql(dot)org |
Subject: | Re: [Erserver-general] Why does Statement.close() close result |
Date: | 2003-10-15 12:24:19 |
Message-ID: | 3F8D3C73.60101@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | aehansen | 2003-10-15 19:46:43 | |
Previous Message | Oliver Jowett | 2003-10-15 04:21:48 | Re: [Erserver-general] Why does Statement.close() close result |