My problems with PostgreSQL

From: Pavel Tavoda <tavoda(at)thr(dot)sk>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: My problems with PostgreSQL
Date: 2002-02-12 14:24:42
Message-ID: 3C6925AA.7090601@thr.sk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello everybody,
I'm new in this list and at beging I want thanks to all
members of postgresql community for stuff you made.
Pretty amazing piece of work. After playing around
with postgresql I found that's right time to thing about
using it for real project. When I was trying switch our
JDBC based project from Oracle (SQL92 compliant code
- no Oracle extensions) to PostgreSQL I found following
obstacles:
1. SQLException is fired back when query result set is empty.
Is this right behaviour ???

2. Datatypes
NUMBER isn't supported
Is't here bigger int type than int8 ???

3. "*ABORT STATE*" problem.
I started our server engine against PostgresSQL. From
generated logs it's was looking good but then I found
BIIIIG problem. I'm doing following scenario (it's
pseudocode not real code), I hope it's self explaining:

insertStatement='insert into aa ....';
try {
dbConn.executeUpdate(insertStatement);
} catch (SQLException e1) {
try {
log.info("Some error when inserting into table -> trying create
table");
dbConn.executeUpdate('create table aa ....');

log.info("Reexecute insert statement");
dbConn.executeUpdate(insertStatement);

} catch(SQLException e2) {
log.error("Some real DB error (wrong schema ?!?)");
}
}

Then simillar scenario via 'psql' tool:
test=# begin;
BEGIN
test=# insert into aa values (23);
ERROR: Relation "aa" does not exist
test=# create table aa (aa int8);
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
*ABORT STATE*

HUH, what is ABORT STATE - I can't make wrong statement ???!!!!???
Why it's necessary abort whole transaction ???!!!???

I'm very experienced Java programmer and experienced C/C++ programmer
(or I was 3 years ago but you can't forget bicycling ;-) now pure Java ).
I'm interested to help you with development (this problem can't stop me) but
I'm very new in postgres and I need help.
Can I turn off this behaviour ?
Is't here some workaround ?
If not, know somebody where to look at first (which part of source code) ?

Thanks for your time and best regards

Pavel

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-02-12 14:32:54 Re: Connection Problem with JDBC
Previous Message Pavel Tavoda 2002-02-12 13:35:56 Re: newb: Howto tell if jdbc is compiled-in?