Numeric data question

James J. Besemer jb at cascade-sys.com
Thu Jul 25 15:13:57 EDT 2002


terry wrote:

> Do you know if the database internal representations of currency
> are consistent across many/most databases?

I dunno but I expect they are different.  Common encodings are as
strings, as "BCD" (2 decimal digits per byte) and "fixed point"
(integer with implied decimal point).

> It would seem like
> that would have to be true for a Python to have a chance for an
> intrinsic implementation that would be relatively universally
> useful by ODBC connections, wouldn't it?

Not really.  Each different Python <--> database interfaces would
handle conversion.

> However, interface
> packages like Pypgsql could translate from Postgres internal to
> Python internal representations without a problem - if it existed
> that is :).

I'm not sure there IS a 'Python internal representation'.  The
different interfaces handle conversions between database native
format and Python base types, such as integers, reals and strings.


--
James J. Besemer  503-280-0838 voice
http://cascade-sys.com  503-280-0375 fax
mailto:jb at cascade-sys.com






More information about the Python-list mailing list