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 CAA6D8BA073 for ; Fri, 11 Feb 2005 11:02:56 +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 79441-05 for ; Fri, 11 Feb 2005 11:02:47 +0000 (GMT) Received: from mail.logi-track.com (www.logi-track.com [213.239.193.212]) by svr1.postgresql.org (Postfix) with ESMTP id D14C58BA0C6 for ; Fri, 11 Feb 2005 11:02:47 +0000 (GMT) Received: from kingfisher.intern.logi-track.com (J3b73.j.pppool.de [85.74.59.115]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logi-track.com (Postfix) with ESMTP id 9AC03308C9; Fri, 11 Feb 2005 12:02:48 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logi-track.com (Postfix) with ESMTP id 9DCE7165E58; Fri, 11 Feb 2005 12:02:42 +0100 (CET) Message-ID: <420C90D1.1000405@logi-track.com> Date: Fri, 11 Feb 2005 12:02:41 +0100 From: Markus Schaber User-Agent: Mozilla Thunderbird 1.0 (X11/20050116) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Antony Paul Cc: pgsql-jdbc@postgresql.org Subject: Re: ERROR: column "total_cost" is of type numeric but expression References: <2989532e050211024126b599f9@mail.gmail.com> In-Reply-To: <2989532e050211024126b599f9@mail.gmail.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3692D0A18E74EEF455589134" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/82 X-Sequence-Number: 12262 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3692D0A18E74EEF455589134 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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@logi-track.com | www.logi-track.com --------------enig3692D0A18E74EEF455589134 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCDJDROVWsnapT9i0RAmmpAKDi/xQyBwU/FXpGSBu672y13MqKXQCfX3HX 7cElxPQ8IOWG6oUEc5wBjhI= =v5tv -----END PGP SIGNATURE----- --------------enig3692D0A18E74EEF455589134--