Skip site navigation (1) Skip section navigation (2)

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

From: Michael Schwipps <msc(dot)listen(at)online(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: float4 or real in function parameter -> PSQLException: ERRORfunction in_test4(double precision) does not exist
Date: 2009-08-05 10:35:47
Message-ID: 20090805103547.GA19462@codersinn.mschwipps.de (view raw or flat)
Thread:
Lists: pgsql-jdbc
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.

The test.sql creates a small test database.
The Float4Test.java contains the code sample, which throws the following
exception.

| Hint: No function matches the given name and argument types. You
| might need to add explicit type casts.
|   Position: 8
|         at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
|         at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
|         at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
|         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
|         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
|         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
|         at Float4Test.main(Float4Test.java:24)


If I call 

|  Select in_test4(0.4) ;

in psql, everything runs fine. 

Is it a bug in the JDBC-driver?

I use postgres 8.4.0 and driver postgresql-8.4-701.jdbc4.jar.


Ciao

Michael

Responses

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2009-08-05 11:13:19
Subject: Re: Using BigInteger as argument to AbstractJdbc2Statement.setObject
Previous:From: Sylvain LerouxDate: 2009-08-05 10:01:35
Subject: Using BigInteger as argument to AbstractJdbc2Statement.setObject

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group