Home » U++ Library support » U++ SQL » PostgreSQL NaN fetching from DB
PostgreSQL NaN fetching from DB [message #50095] |
Thu, 26 July 2018 16:33  |
shutalker
Messages: 15 Registered: November 2017 Location: Moscow
|
Promising Member |
|
|
Hi!
I've noticed that NaN floating point values fetches from DB as zero values because of using Atof(). There is no possibility to check whether the value is NaN or not via such functions like IsNaN() or IsNull(). Also I have a question about fetching integers: why atoi() call is used in this code, and not ScanInt()?
void PostgreSQLConnection::GetColumn(int i, Ref f) const
{
...
switch(info[i].type)
{
...
case INT_V:
f.SetValue(atoi(s));
break;
...
}
...
}
Here is a patch in attachments. Could you check and comment it?
[Updated on: Sat, 04 August 2018 11:31] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 05:57:28 CEST 2025
Total time taken to generate the page: 0.00935 seconds
|