Skip site navigation (1) Skip section navigation (2)

Re: Hibernate and Postgres 8.3/8.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Michael Bell <mikebell90(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Hibernate and Postgres 8.3/8.4
Date: 2009-08-22 13:48:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Oliver Jowett <oliver(at)opencloud(dot)com> 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

In response to

pgsql-jdbc by date

Next:From: J. W. UlbtsDate: 2009-08-23 16:31:12
Subject: Re: Display SQL from Java Prepared Statement
Previous:From: Campbell, LanceDate: 2009-08-22 12:53:53
Subject: Display SQL from Java Prepared Statement

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group