Re: My problems with PostgreSQL - Mailing list pgsql-jdbc

From Peter V. Cooper
Subject Re: My problems with PostgreSQL
Date
Msg-id 5.1.0.14.0.20020212075128.00b0de30@mail.gte.net
Whole thread Raw
In response to My problems with PostgreSQL  (Pavel Tavoda <tavoda@thr.sk>)
List pgsql-jdbc
I converted all my oracle numbers to decimal. The precision
of none or zero gives me an integer. This may be a novice
way of doing things but I needed to get a demo up and
running. The decimal number seems to work for my sequence
as well. Can anyone shed some light on the problems with this
approach as I would be glad to change this 'partial hack'. Do
I need to use int8 or something like that. I was used to using
number (X,Y) in Oracle where Y=0 for an integer.

At 03:24 PM 2/12/2002 +0100, Pavel Tavoda wrote:
>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
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


pgsql-jdbc by date:

Previous
From: tony
Date:
Subject: Re: Mysterious vanishing '
Next
From: Barry Lind
Date:
Subject: Re: My problems with PostgreSQL