From: | ismo(dot)tuononen(at)solenovo(dot)fi |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | 7.4 driver vs 8.2 driver |
Date: | 2007-04-11 13:45:52 |
Message-ID: | Pine.LNX.4.64.0704111630280.9995@ismoli.solenovo.jns |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
we have problem with our 8.2 database. we use jdbc driver to connect to
database.
query
select trunc($1,2);
and that $1 is binded to double precision
works with pg74.216.jdbc3.jar driver but with postgresql-8.2-504.jdbc4.jar
we get error:
ERROR: function round(double precision, integer) does not exist at
character 26
HINT: No function matches the given name and argument types. You may need
to add explicit type casts.
to change all queries to:
select
trunc(to_number(to_char($1,'99999999999999.999999),'99999999999999.999999');
is just stupid and takes very long time, because it must be done manually
(queries are in reality much more complex)
any ideas what to do?
is it best to stay in 7.4 database?
I just don't understand why postgresql dont have trunc(double
precision,int) when it have trunc(double precision),trunc(numeric) and
trunc(numeric,int)
Ismo
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-04-11 14:48:43 | Re: random escape function |
Previous Message | Xavier Poinsard | 2007-04-11 13:21:29 | Re: Prepared statement parameter and timestamp |