Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » PostgreSQL NaN fetching from DB
PostgreSQL NaN fetching from DB [message #50095] Thu, 26 July 2018 16:33 Go to previous message
shutalker is currently offline  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

 
Read Message
Read Message
Previous Topic: Implementing PostgreSql returning statement
Next Topic: Image in QLITE3 database
Goto Forum:
  


Current Time: Wed May 15 01:52:19 CEST 2024

Total time taken to generate the page: 0.02386 seconds