From: Sylvain Leroux <sl20@wanadoo.fr>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: float4 or real in function parameter -> PSQLException: ERROR function in_test4(double precision) does not exist
Date: Wed, 05 Aug 2009 15:16:33 +0200
Message-ID: <4A798631.2090003@wanadoo.fr> (raw)
In-Reply-To: <20090805103547.GA19462@codersinn.mschwipps.de>
References: <20090805103547.GA19462@codersinn.mschwipps.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: sl20@wanadoo.fr
Subject: Re: float4 or real in function parameter -> PSQLException: ERROR function in_test4(double precision) does not exist
In-Reply-To: <4A798631.2090003@wanadoo.fr>
References: <20090805103547.GA19462@codersinn.mschwipps.de> <4A798631.2090003@wanadoo.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox