Table reflection broken with InformixDB

Issue #1645 resolved
Former user created an issue

The Informix dialect references the attribute ''owner'' in sqlalchemy.Table (''lib/sqlalchemy/databases/informix.py:256''), which does not seem to ever get set in the Table constructor (the other dialects use ''schema'' instead). There also appears to be a typo in the type mapping dictionary (''lib/sqlalchemy/databases/informix.py:164'') causing an exception to be raised when reflecting tables with SMALLFLOAT columns.

I've attached a patch against 0.5.6 that works for me in the hopes that it will be useful. Note though this is the first time I've ever looked at sqlalchemy internals, so I'm not at all sure I'm doing the right thing.

Comments (5)

  1. Mike Bayer repo owner

    the informix dialect was donated somewhat anonymously some years ago and has never been tested, since nobody has access to an informix test environment. If you have the resources to help, we mostly need the dialect fixed up for 0.6, which is the current SQLAlchemy trunk. The structure of dialects has changed somewhat between 0.5 and 0.6 (not too much though and lots of folks have been contributing dialects for 0.6). If you can spare some cycles that would be a huge help.

  2. Former user Account Deleted

    I can't promise I'll have the time to do this, but I'll do what I can. I should also say that I'm a sqlalchemy newbie. Anyway, I'm currently using the informix dialect behind a web-service (the db is non-transactional), so it will get some testing that way. I'll submit additional patches as needed. Regarding 0.6: is there documentation on how to implement dialects (and related sqlite internals) somewhere, or should I just use an existing dialect as a model? I assume the informix dialect test cases would need fleshing out; can you clarify what a dialect test case should cover?

  3. Log in to comment