On Fri, 14 Jun 2019 at 07:13, Simon Slavin <slav...@bigfraud.org> wrote:

> On 13 Jun 2019, at 10:01pm, Donald Shepherd <donald.sheph...@gmail.com>
> wrote:
>
> > Given there's been numerous comments to the effect that SQLite now
> supports
> > -0.0 storing and retrieval other than printing, I'm curious which version
> > this was implemented in as I wouldn't mind removing my custom code when
> we
> > move to a SQLite version with this improvement.
>
> For auditing and probity reasons, I would store the values twice: once in
> a BLOB and another time in a REAL.  When you need to look at the value you
> can choose which one to look at depending on why you're looking at it.
>

Thanks to the very useful data affinity rules and flexibility in SQLite we
store a REAL if SQLite supports the value and a BLOB if it doesn't (off the
top of my head, this is -0.0 and the NaN values - based off testing on
3.8.7.2 which we haven't revisited, hence my current curiousity), and the
data type informs us as to whether we need to do a memory conversion from
binary data to floating point on the way back out.

Regards,
Donald Shepherd.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to