Re: Pooling Prepared Statements

From: Rainer Klute <rainer(dot)klute(at)epost(dot)de>
To: Jo o Paulo Caldas Ribeiro <jp(at)mobicomp(dot)com>
Cc: Michael Paesold <mpaesold(at)gmx(dot)at>, "G(dot)Nagarajan" <gnagarajan(at)dkf(dot)de>, pgsql-jdbc(at)postgresql(dot)org, "Rainer Klute" <rainer(dot)klute(at)epost(dot)de>
Subject: Re: Pooling Prepared Statements
Date: 2002-08-30 05:31:46
Message-ID: 200208300531.g7U5Vkv06741@tommy.rainer-klute.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

>You are right. It's 1 statement -> 1 resultset at a time.
>
>As Dave said: "A ResultSet object is automatically closed when the
>Statement object
>that generated it is closed, re-executed, or used to retrieve the next
>result from a sequence of multiple results. "
>
>My mistake.

It is still a good idea to close result sets after use. If you
rely on automatically closing them you might have some wasted
resources lying around because you might execute a statement
and never reuse it.

It is also a good idea to explicitly close statements and
connections.

Best regards
Rainer Klute

Rainer Klute IT-Consulting GmbH
Dipl.-Inform.
Rainer Klute E-Mail: klute(at)rainer-klute(dot)de
Körner Grund 24 Telefon: +49 172 2324824
D-44143 Dortmund Telefax: +49 231 5349423

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Curt Sampson 2002-08-30 06:21:43 Re: Pooling Prepared Statements
Previous Message Harrison 2002-08-29 23:50:26 7.0 - 7.2 upgrade, org.postgresql.Driver Class not found