Re: ResultSet storing all rows with defaulftFetchSize to 5000 - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: ResultSet storing all rows with defaulftFetchSize to 5000
Date
Msg-id 3558.1518451137@sss.pgh.pa.us
Whole thread Raw
In response to Re: ResultSet storing all rows with defaulftFetchSize to 5000  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: ResultSet storing all rows with defaulftFetchSize to 5000  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-jdbc
Vladimir Sitnikov <sitnikov.vladimir@gmail.com> writes:
> I have no idea why PostgreSQL closes all the cursors as transaction
> ends,

Because the SQL standard says so.  If a cursor isn't declared WITH HOLD,
then it's implicitly closed at transaction commit, cf SQL:2011 4.33
"Cursors": 

    An open cursor that was not defined as a holdable cursor is also
    closed by a <commit statement>.

Also, 14.2 <cursor properties> says that WITHOUT HOLD is the default
assumption if you don't explicitly say WITH HOLD.

(Yes, we do support WITH HOLD.)

            regards, tom lane


pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: ResultSet storing all rows with defaulftFetchSize to 5000
Next
From: Jaime Soler
Date:
Subject: Re: ResultSet storing all rows with defaulftFetchSize to 5000