Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4B7CA635A06 for ; Wed, 5 Aug 2009 10:16:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 79261-01-6 for ; Wed, 5 Aug 2009 13:16:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp20.orange.fr (smtp20.orange.fr [80.12.242.27]) by mail.postgresql.org (Postfix) with ESMTP id 001B0633EA0 for ; Wed, 5 Aug 2009 10:16:37 -0300 (ADT) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2012.orange.fr (SMTP Server) with ESMTP id 9878D20000B0 for ; Wed, 5 Aug 2009 15:16:35 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2012.orange.fr (SMTP Server) with ESMTP id 8A43620000B2 for ; Wed, 5 Aug 2009 15:16:35 +0200 (CEST) Received: from [10.129.36.10] (Mix-Rennes201-1-162.w193-250.abo.wanadoo.fr [193.250.26.162]) by mwinf2012.orange.fr (SMTP Server) with ESMTP id 1F7D620000B0 for ; Wed, 5 Aug 2009 15:16:35 +0200 (CEST) X-ME-UUID: 20090805131635129.1F7D620000B0@mwinf2012.orange.fr Message-ID: <4A798631.2090003@wanadoo.fr> Date: Wed, 05 Aug 2009 15:16:33 +0200 From: Sylvain Leroux Organization: http://www.chicoree.fr User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 CC: pgsql-jdbc@postgresql.org Subject: Re: float4 or real in function parameter -> PSQLException: ERROR function in_test4(double precision) does not exist References: <20090805103547.GA19462@codersinn.mschwipps.de> In-Reply-To: <20090805103547.GA19462@codersinn.mschwipps.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.107 tagged_above=-10 required=5 tests=BAYES_40=-0.185, MISSING_HEADERS=1.292 X-Spam-Level: * X-Archive-Number: 200908/10 X-Sequence-Number: 19859 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