RE: JDBC Drop/Create problem? - Mailing list pgsql-interfaces

From Peter Mount
Subject RE: JDBC Drop/Create problem?
Date
Msg-id 1B3D5E532D18D311861A00600865478CF1B635@exchange1.nt.maidstone.gov.uk
Whole thread Raw
In response to JDBC Drop/Create problem?  (Greg Speegle <Greg@10happythings.com>)
List pgsql-interfaces
Dropping a non-existent table should throw an exception as well as mark any
open transaction as aborted.

I'd say either:

* using autoCommit while checking for existing tables.
* commit and begin a new transaction afterwards.
* Use temporary tables, so the table doesn't survive the connection.

Peter

-- 
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount@maidstone.gov.uk
WWW: http://www.maidstone.gov.uk
All views expressed within this email are not the views of Maidstone Borough
Council


> -----Original Message-----
> From: Greg Speegle [mailto:Greg@10happythings.com]
> Sent: Thursday, December 07, 2000 4:35 PM
> To: pgsql-interfaces@postgresql.org
> Subject: [INTERFACES] JDBC Drop/Create problem?
> 
> 
> 
> Scenario:
> Want to create a table via JDBC
> 
> Plan:
> Drop existing table (if any)
> Create new one
> 
> Problem:
> If there was no table before, the Statement to drop the table 
> throws an 
> exception, which is fine and not a problem.
> However, if I then continue to try to create the table, I get 
> a "table 
> not found" exception thrown by the Create
> Statement. Doing a commit between the two eliminates the problem, but 
> this doesn't look like how the code
> should work, or am I missing something?
> 
> Thanks for input,
> 
> Greg Speegle
> BaylorUniversity
> 


pgsql-interfaces by date:

Previous
From: Greg Speegle
Date:
Subject: JDBC Drop/Create problem?
Next
From: Greg Speegle
Date:
Subject: Re: JDBC Drop/Create problem?