X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CEA248BA12F for ; Fri, 11 Feb 2005 11:28:08 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81820-08 for ; Fri, 11 Feb 2005 11:27:57 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by svr1.postgresql.org (Postfix) with ESMTP id D92638B9CE9 for ; Fri, 11 Feb 2005 11:27:59 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 68so321836wri for ; Fri, 11 Feb 2005 03:27:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=K/NBvaJS2Wn23gn2mYOmAkzuOfpwDk+4Ag4g1jRj50hDR+cqKyxe+5i22YsWw2CZdrZO6Uai9/sLjvyQm3eGJxvCDT9hfxL+RKLPL87OnTU7VZstnDMv4SK8vWxGwFwjMP3/9UXdHSzcWcYDndzSLG26hITbajDkksfqAnYLWvA= Received: by 10.54.32.33 with SMTP id f33mr54397wrf; Fri, 11 Feb 2005 03:27:59 -0800 (PST) Received: by 10.54.31.32 with HTTP; Fri, 11 Feb 2005 03:27:58 -0800 (PST) Message-ID: <2989532e0502110327369d6f93@mail.gmail.com> Date: Fri, 11 Feb 2005 16:57:58 +0530 From: Antony Paul Reply-To: Antony Paul To: Markus Schaber Subject: Re: ERROR: column "total_cost" is of type numeric but expression Cc: pgsql-jdbc@postgresql.org In-Reply-To: <420C90D1.1000405@logi-track.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable References: <2989532e050211024126b599f9@mail.gmail.com> <420C90D1.1000405@logi-track.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.544 tagged_above=0 required=5 tests=AWL, FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200502/84 X-Sequence-Number: 12264 7.3.3 driver have problem in set autocommit. I used setString() for number in Oracle 8i.=20 rgds Antony Paul On Fri, 11 Feb 2005 12:02:41 +0100, Markus Schaber wrote: > Hi, Antony, >=20 > Antony Paul schrieb: >=20 > > 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. >=20 > 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. >=20 > I can three solutions / workarounds for your problem: >=20 > - 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. >=20 > - Use a "?::numeric" cast in your prepared statement (not tested here). >=20 > - Update your application to use the proper numeric types. >=20 > Markus >=20 > -- > markus schaber | dipl. informatiker > logi-track ag | rennweg 14-16 | ch 8001 z=FCrich > phone +41-43-888 62 52 | fax +41-43-888 62 53 > mailto:schabios@logi-track.com | www.logi-track.com >=20 >=20 >