Re: Lifespan of temporary table

From: "Mihai Gheorghiu" <tanethq(at)earthlink(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Lifespan of temporary table
Date: 2002-08-06 18:35:51
Message-ID: 001a01c23d78$182f0620$6e646464@New6.Travel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Thank you very much.
So, if I want to save disk space on the PG server, I should execute a DROP
TABLE before closing the servlet connection to the poolmanager.
What method of PreparedStatement should I use: execute() or executeUpdate()?

>Mihai,
>
>Your assumption is correct, the temp table will not be removed until the
>connection is really closed.
>
>Dave
>On Tue, 2002-08-06 at 13:54, Mihai Gheorghiu wrote:
>> It is my understanding from the PG documentation that a temporary table
>> lasts until the end of the session.
>> When using jdbc, which one of
>> Connection con = DriverManager.getConnection(...)
>> or
>> PreparedStatement sql = con.prepareStatement(...)
>> actually opens a connection to the PG server?
>> What if I'm using poolmanager? When will the table be removed? (Because
if
>> session==connection, con.close() in my servlet just returns the
connection
>> to the pool, but the PG server sees the session still open.)
>> Thank you all.
TIP 4: Don't 'kill -9' the postmaster

Browse pgsql-jdbc by date

  From Date Subject
Next Message Magnus Hagander 2002-08-07 08:35:08 Re: Connecting via SSL not working (except from psql)
Previous Message Paul Stead 2002-08-06 18:03:45 Re: aggregate functions and timestamps in JDBC, possible bug?