On 05/01/2013 20:49, Darren Duncan wrote:
On 2013.01.05 5:39 AM, Lyle wrote:
I'm not overly familiar with Perl's internal handling of number. I
guess if you
have DECIMAL from a character string Perl will switch it out to an
approximate
the moment you do a calculation on it. Furthermore if the DBI (or the
DBDs, I'm
not sure where the distinction lies) is already putting it into a
Perl decimal
which is floating point, then the battle has already been lost before
it gets to
me.
...
As for what DBDs actually do, well that's a different matter; but I'm
talking about what *could* be done in the Perl somewhere, and
typically I'd expect the DBD to make that decision on the Perl's behalf.
The DBI docs have:
"Most data is returned to the Perl script as strings. (Null values are
returned as |undef|.) This allows arbitrary precision numeric data to be
handled without loss of accuracy. Beware that Perl may not preserve the
same accuracy when the string is used as a number."
So as long as the DBD isn't breaking this, I should be getting decimal
numbers back as strings.
Lyle