postgres reflecttable fails for table with unlimited numeric field

Issue #349 resolved
J Pellerin created an issue

postgres (release 0.2.8 and trunk) reflecttable raises an error when the table contains a numeric field with undefined precision:

 File "build/bdist.freebsd-4.10-RELEASE-i386/egg/sqlalchemy/databases/postgres.py", line 355, in reflecttable
AttributeError: 'NoneType' object has no attribute 'split'

The bug is here: source:/sqlalchemy/trunk/lib/sqlalchemy/databases/postgres.py#L354 (line 354).

And can be fixed, at least naively, by catching the AttributeError and setting numericprec, numericscale to (None, None).

Sorry for not uploading a patch. I can put one up in the next few days, time permitting, if you don't get to it first.

Comments (3)

  1. Log in to comment