From: | Peter Mount <petermount(at)maidstone(dot)gov(dot)uk> |
---|---|
To: | "'Greg Speegle'" <Greg(at)10happythings(dot)com>, pgsql-interfaces(at)postgresql(dot)org |
Subject: | RE: JDBC Drop/Create problem? |
Date: | 2000-12-07 16:51:31 |
Message-ID: | 1B3D5E532D18D311861A00600865478CF1B635@exchange1.nt.maidstone.gov.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)maidstone(dot)gov(dot)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(at)10happythings(dot)com]
> Sent: Thursday, December 07, 2000 4:35 PM
> To: pgsql-interfaces(at)postgresql(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Speegle | 2000-12-07 18:19:12 | Re: JDBC Drop/Create problem? |
Previous Message | Greg Speegle | 2000-12-07 16:34:47 | JDBC Drop/Create problem? |