From: | Antony Paul <antonypaul24(at)gmail(dot)com> |
---|---|
To: | Markus Schaber <schabios(at)logi-track(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: ERROR: column "total_cost" is of type numeric but expression |
Date: | 2005-02-11 11:27:58 |
Message-ID: | 2989532e0502110327369d6f93@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
7.3.3 driver have problem in set autocommit.
I used setString() for number in Oracle 8i.
rgds
Antony Paul
On Fri, 11 Feb 2005 12:02:41 +0100, Markus Schaber
<schabios(at)logi-track(dot)com> wrote:
> Hi, Antony,
>
> Antony Paul schrieb:
>
> > I am testing PostgreSQL 8.0.1. I compiled and installed it.
> > Downloaded JDBC driver postgresql-8.0-310.jdbc3.jar for JDK 1.4.(I was
> > unable to find it in source) Dumped my 7.3.3 database. Restored it in
> > new installation. Run the application and it gives this error.
> > The error is when I use setString() to insert into a numeric
> > field. I hope it is bug. Otherwise we have to rewrite our application.
> > The error message can be seen in server log also.
>
> Using setString() to insert anything else from text types is not
> possible any more using pgjdbc 8.0 jars, as the new driver makes
> stricter use of type checking. One of our third-party apps also suffers
> from this problems.
>
> I can three solutions / workarounds for your problem:
>
> - Use the pgjdbc 7.4 jar file, it should work fine against a postgresql
> 8.0 server. You can also stay with the 7.3 jar you used against your
> 7.3.3 server, as AFAIK pg8.0 still supports the V2 query protocol.
>
> - Use a "?::numeric" cast in your prepared statement (not tested here).
>
> - Update your application to use the proper numeric types.
>
> Markus
>
> --
> markus schaber | dipl. informatiker
> logi-track ag | rennweg 14-16 | ch 8001 zürich
> phone +41-43-888 62 52 | fax +41-43-888 62 53
> mailto:schabios(at)logi-track(dot)com | www.logi-track.com
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Antony Paul | 2005-02-11 11:31:38 | Re: ERROR: column "total_cost" is of type numeric but expression is of type character varying |
Previous Message | Thomas Hallgren | 2005-02-11 11:12:51 | Re: PLJava and Database Meta Data |