Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D1B79634FDE for ; Sat, 22 Aug 2009 10:48:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27698-02 for ; Sat, 22 Aug 2009 13:48:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id F2CC163241B for ; Sat, 22 Aug 2009 10:48:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n7MDmRcF008389; Sat, 22 Aug 2009 09:48:28 -0400 (EDT) To: Oliver Jowett cc: Michael Bell , pgsql-jdbc@postgresql.org Subject: Re: Hibernate and Postgres 8.3/8.4 In-reply-to: <4A8F9CDF.6040601@opencloud.com> References: <57606.88414.qm@web43132.mail.sp1.yahoo.com> <4A8F9CDF.6040601@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Sat, 22 Aug 2009 19:23:11 +1200" Date: Sat, 22 Aug 2009 09:48:27 -0400 Message-ID: <8388.1250948907@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/52 X-Sequence-Number: 19901 Oliver Jowett writes: > Michael Bell wrote: >> Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: smallint = character varying >> Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. >> Position: 628 >> The queries in question are all "correct" in that they use query.setXXX, where XXX is a "reasonable" thing like String, Integer, Long.....nothing fancy... > Well, from the exception, either Hibernate is doing setString() on a > parameter that is compared to a smallint, or it's doing setShort() on a > parameter that is compared to a varchar type.. so one of the two sides > is wrong. Yeah. This looks to me like Hibernate contains instances of the exact sort of bug --- not trivial issue, real bug --- that we removed the implicit casts to help people catch. You should definitely file a bug report with them. regards, tom lane