RE: JDBC Drop/Create problem?

Поиск
Список
Период
Сортировка
От Peter Mount
Тема RE: JDBC Drop/Create problem?
Дата
Msg-id 1B3D5E532D18D311861A00600865478CF1B635@exchange1.nt.maidstone.gov.uk
обсуждение исходный текст
Ответ на JDBC Drop/Create problem?  (Greg Speegle <Greg@10happythings.com>)
Список 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 по дате отправления:

Предыдущее
От: Greg Speegle
Дата:
Сообщение: JDBC Drop/Create problem?
Следующее
От: Greg Speegle
Дата:
Сообщение: Re: JDBC Drop/Create problem?