From: Gerhard <ger...@gm...> - 2002-08-05 01:40:50
|
* terry <tg...@ci...> [2002-07-29 16:39 -0400]: > I posted the 'other end' of this problem last week on the Python > list under "Numeric Data Types". The result was that there is no > intrinsic Python Numeric data type, so simple computations such > as: Total = Qty * UnitPrice cannot be done with data from > Postgres. Following some of the links showed that there seems to > be little interest in making an intrinsic numeric data type. MaL wants to produce some for his mxODBC database interface. He has alrady the startings of one (which is based on GMP, IIRC) in his experimental package from egenix.com. I myself didn't check it out, yet. It's not that difficult to produce a fixed point data type yourself. I'm pretty sure that we can enhance or rewrite PgNumeric so that the current problems are solved. If you really want to do calculations using this data type, then a rewrite in C should provide a boost in performance. This has been on the pyPgSQL TODO list for about a year now ... Gerhard -- mail: gerhard <at> bigfoot <dot> de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id AD24C930 public key fingerprint: 3FCC 8700 3012 0A9E B0C9 3667 814B 9CAA AD24 C930 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) |