Re: float4 or real in function parameter -> PSQLException: ERROR function in_test4(double precision) does not exist

Поиск
Список
Период
Сортировка
От Sylvain Leroux
Тема Re: float4 or real in function parameter -> PSQLException: ERROR function in_test4(double precision) does not exist
Дата
Msg-id 4A798631.2090003@wanadoo.fr
обсуждение исходный текст
Ответ на float4 or real in function parameter -> PSQLException: ERROR function in_test4(double precision) does not exist  (Michael Schwipps <msc.listen@online.de>)
Список pgsql-jdbc
Hi,

Michael Schwipps a écrit :
 > Hi,
 >
 > We use database functions in our application.
 >
 > Today I want to use a float4/real Parameter for the first time. You can
 > see a sample in in_test4.
 > Float8/double-parameters run fine.
 >
 > in psql, everything runs fine.
 >
 > Is it a bug in the JDBC-driver?

I have my nose just on it: in AbstractJdbc2Statement.java float
parameters are passed as FLOAT8 (just like in setDouble):
 >     public void setFloat(int parameterIndex, float x) throws SQLException
 >     {
 >         checkClosed();
 >         bindLiteral(parameterIndex, Float.toString(x), Oid.FLOAT8);
 >     }

I'm new here, but I think it should be a FLOAT4. Try to change it in the
source code of the driver to see if it works after that.


Best regards,
Sylvain Leroux



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Sylvain Leroux
Дата:
Сообщение: Re: Using BigInteger as argument to AbstractJdbc2Statement.setObject
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Using BigInteger as argument to AbstractJdbc2Statement.setObject