Re: Fwd: FreeTDS on OSX 10.10 losing precision

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4dU=KScihie_kMmCDHb=d-+t6mg+Xbo+K5KRT8wdNXWFQ@mail.gmail.com>
2014-12-05 15:03 GMT+00:00 Alex Derbes <[email protected]>:
> I have FreeTDS 0.91 installed on Mac OSX 10.10. When Querying a SQLServer
> 2012 database, columns defined with double precision numbers are truncated
> to single precision. I've checked the query with both sqsh and with the
> python pymssql driver and get the same result.
>
> Is it possible that I need to set something in my freetds.conf file to
> enable double precision math?
>
> Or is it possible that the column definition in the SQL Server database is
> being incorrectly marshaled to a single precision number?
>
> Thanks,
> --Alex Derbes
>
> The version of FreeTDS came from brew, here is the version information:
>
> freetds: stable 0.91, HEAD
>
> http://www.freetds.org/
>
> /usr/local/Cellar/freetds/0.91_2 (600 files, 10.0M) *
>
>   Built from source
>
> From:
> https://github.com/Homebrew/homebrew/blob/master/Library/Formula/freetds.rb


I don't think FreeTDS will loose precision on protocol. Double
precision is very old and supported by all TDS versions.
What I think is that the conversion just format the string will less
precision than what you expect.
Some time ago there has been a patch on this direction. Can you try a
snapshot version? See http://www.freetds.org/software.html.

Frediano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.