• Vadim Zeitlin's avatar
    Make text-to-double conversion exact in PostgreSQL backend. · c3cd3093
    Vadim Zeitlin authored
    By setting extra_float_digits to its maximal value (instead of the default 0)
    we can ensure that the conversion from text (which we use when saving the
    values in the database) to double (used internally) and back (when we retrieve
    the values) is lossless and so that we read back exactly the same values as we
    had written.
    
    In principle, the best solution would be to use binary format with
    PQexecParams() instead: this would avoid the conversion to/from text entirely
    and so be undoubtedly correct and probably more efficient. However it also
    would be more difficult, especially for NUMERIC types as we would need to
    convert them to/from the protocol wire format ourselves, so for now just make
    it work correctly in the simplest possible way.
    c3cd3093
Name
Last commit
Last update
bin Loading commit data...
build Loading commit data...
cmake Loading commit data...
docs Loading commit data...
include Loading commit data...
languages/ada Loading commit data...
src Loading commit data...
tests Loading commit data...
www Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CHANGES Loading commit data...
CMakeLists.txt Loading commit data...
CTestConfig.cmake Loading commit data...
LICENSE_1_0.txt Loading commit data...
README.md Loading commit data...
TODO Loading commit data...