[PyGreSQL] DECIMAL to float, alternatives?

Gerald Forster gfnews at aon.at
Wed Jan 31 14:02:53 EST 2007


D'Arcy J.M. Cain wrote:
> On Wed, 31 Jan 2007 11:09:48 +0100
> Christoph Zwerschke <cito at online.de> wrote:
>> Maybe PyGreSQL should support the Decimal type? For DECIMAL (=NUMERIC)
>> with a scale of 0, we could also use long ints.
> 
> Yes.  Money too should return Decimal.  I don't think that it is
> unreasonable for current PyGreSQL to require current Python in this
> case, especially since it is easy to add the Decimal module to older
> versions.
> 
> The problem is getting the C code to return Decimal.  That's one reason
> that I want to move that processing into pg.py and pgdb.py.

Hi,

consider that "money" is deprecated.
See
http://www.postgresql.org/docs/current/interactive/datatype-money.html

Best regards
Gerald


More information about the PyGreSQL mailing list