Float Values Infinity, -Infinity and Nan are not mapped correctly, they are actually not mapped at all atleast for postgresql. I have attached a sample program that shows the issues here, and I have also attached a patch to the types.py which will solve the writing to the database issue for PostgreSql. I am not sure if different databases implement this differently. I have also not yet looked into reading these values from the database. I think, reading would be fine but testing is needed.
The sample program:
sqlalchemy_test.py: - To run: python sqlalchemy_test.py First run will produce an error. After applying the patch: - patch -u sqlalchemy/types.py types.py.patch It should run fine, and insert correctly into the db.
I am not sure how this was overlooked. Hope it is fixed soon.
-- Hatem Nassrat