Hi,
I hope Ed filled everyone in on the my efforts to get the Postgres backend working.
So far I have not found a 'cursor class' to return from the getDictCursorClass function in any of the standard postgres modules - Psycopg, PyPgSQL. I know that it does not sound right but I checked the source to both of the modules and there is not a 'CLASS' (in the python sense anyway) for any type of cursor defined. However, the psycopg developers are soon to release a new version 2.0 that does contain a 'CLASS' - dictCursor. This will work just fine but it's not generally available.
The current issue I'm facing has to do with getFields(). With MySQL you are just using 'Describe tablename' which provides three columns - field name, field type, and field attributes. I can easily emulate the first but have a few issues with the other two.
In Postgres the user can define a data type. In fact I have a data type "Client" which was made up using Last Name, First Name. So how can I define a 'fldType' (the var in the function that's assigned a data type)? At the moment I'm trying to discover how posgtres determines how to handle the special data types. Somewhere postgres must store the type (varchar ....) so that it can store the data correctly.
The second issue has also to do with the fact that special attributes are possible in Postgres. In the case of just PK no problem but there are others that are important.
Last issue is deciding what versions to support. Most of things work with older versions (prior to 7.3) but I think most users are at 7.3 or better. In fact version 8.0 in beta is out.
What does the group think should be done on the versions.
John
©2004 John Fabiani |