Hi all,
I am writing a program in java that uses jdbc to connect to a postgres DB. Everything works fine, there is only that problem that i hope you can help. I have a table
Then i use this table in my program to insert some values of type float. The problem is that apparently the java float(or double actually) is not compatible with the postgres real data type.
When i try to do a select from that table with a=0.2 for example i get an empty table, but if i change that to
a>0.1 and a<0.3
i get the proper result. The problem is that i cant use something like that since i want to get part of the table dynamically from within java.
Is there a way to define how postgres real and java float work alike?
thanks for any help provided.
Ilias
I am writing a program in java that uses jdbc to connect to a postgres DB. Everything works fine, there is only that problem that i hope you can help. I have a table
Code:
Create table test(
a real,
b int)
When i try to do a select from that table with a=0.2 for example i get an empty table, but if i change that to
a>0.1 and a<0.3
i get the proper result. The problem is that i cant use something like that since i want to get part of the table dynamically from within java.
Is there a way to define how postgres real and java float work alike?
thanks for any help provided.
Ilias