[DB-SIG] DB API v2.0 : how am I to get a field default value if it isn't in Cursor.description

Eugene P. Sizikov esizikov@teleross.ru
06 Mar 2003 09:53:41 +0800


I'm using Python with MySQLdb (DB API v2.0 compatible), and surpriselly
have not found a way to get some SQL table structural information such
as fields DEFAULT value and fields index type (PRIMARY, FOREIGN, UNIQUE,
MULTIPLE and so on). How am I to get that info if it isn't in
Cursor.description? While looking into MySQL-python sources I realized
that the info (at least default values) is just unused when the Python
'description' tuple is constructed.

So, I think that at least fields DEFAULT value MUST be in

Any comments or hints or advices?

Best regards
Eugene Sizikov
Golden Telecom, TeleRoss
Russian Federation