Boris Klug wrote:

Hello!

we have several object with doubles that map to numeric(13,3) in our
PostgreSQL DB (version 7.2). When Castor (version 0.9.4.1) tries to write
back the object after a commit(), I get the following error:

2002.11.29 11:30:14: WUI,INFO: [Castor]:
org.exolab.castor.jdo.TransactionAbortedException: Nested error:
org.exolab.castor.jdo.PersistenceException:
Nested error: java.sql.SQLException: ERROR: Unable to identify an operator
'=' for types 'numeric' and 'double precision'
2002.11.29 11:30:14: WUI,INFO+ You will have to retype this query using an
explicit cast

This happends with the following JDBC driver versions for PostgreSQL: 7.2,
7.3rc1, postgresdriver with is bundled with Castor.
It does not occure with driver version 7.3beta1 which is now the only working
driver available.

You also produce the msg when you to this in psql:

>create table t (x numeric(13,3));
>insert into t values(89.3);
>select * from t where x=89.3;

ERROR: Unable to identify an operator '=' for types 'numeric' and 'double
precision'
You will have to retype this query using an explicit cast

If you change the where clause to "where x='89.3' it works. This seems to be
the right thing because also "where x='0089.30' gives back the row.

Now PostgreSQL 7.3 is out and we want to use the final driver, no longer the
beta one. So the question is now: Is this a problem inside the jdbc driver of
PostgreSQL or inside Castor? Is there a workaround?

I get the same error with test castor.postgresql.TC20. As you produce
the same problem with direct SQL, I would say that this is a postgresql
issue...


--
Mickael Guessant

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev



Reply via email to