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 BFF1C8B9CE9 for ; Fri, 11 Feb 2005 11:31:55 +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 83092-03 for ; Fri, 11 Feb 2005 11:31:37 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.193]) by svr1.postgresql.org (Postfix) with ESMTP id 35D4B8BA141 for ; Fri, 11 Feb 2005 11:31:39 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 68so322266wri for ; Fri, 11 Feb 2005 03:31:39 -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=B217l6VTRF8TnJaJ+pDdI4g/qBm3V+iyusXw50h0s2jXBEcr0AWvuG6wec5dK15PrJpxAjSR/jOkzm6lnyGlxKUwXzuSyJ/XpnbUsJAIXceKsZW25t5OmbHal9ctlIthLIz+ovxyzOjsaF42wz2e91uerZEU1KOmKplLlXjr5yk= Received: by 10.54.51.73 with SMTP id y73mr211692wry; Fri, 11 Feb 2005 03:31:39 -0800 (PST) Received: by 10.54.31.32 with HTTP; Fri, 11 Feb 2005 03:31:38 -0800 (PST) Message-ID: <2989532e05021103316848d2a3@mail.gmail.com> Date: Fri, 11 Feb 2005 17:01:38 +0530 From: Antony Paul Reply-To: Antony Paul To: Markus Schaber Subject: Re: ERROR: column "total_cost" is of type numeric but expression is of type character varying 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/85 X-Sequence-Number: 12265 Updating application is going to be a lot of work. If it breaks existing applications why it is implemented. I dont think type checking is a big thing. What is its use ?. I will try 7.4 driver. 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 >