[DB-SIG] Getting schemas and other niceties

Fabien COUTANT fcoutant at freesurf.fr
Mon Jul 21 10:31:11 EDT 2003

> On Sun, 20 Jul 2003, Fabien COUTANT wrote:
>> Yes, exactly.  I want types returned as driver.STRING, driver.BINARY,
>> driver.NUMBER etc.
> This causes tremendous information loss with the current DB-API type
> objects.  I _need_ to know if the driver.NUMERIC is an SQL NUMERIC or a
> FLOAT, or an INT8 or INT32 or INT64.

Returning the exact type is possible too.  In fact the current mxODBC
package returns both a type code and a type name.  I was speaking of the
type code, you are speaking of the type name, so this is compatible.  In
fact I agree that we need the exact DB-specific type name too.

> I'm not suggesting the removal of ordinal addressing of columns -- just
> the ordinal relationship between column schema/descritions.  i.e.,
> extending the existing 7 element tuple is a silly thing to do.  Thus
> there will still be a column values 0..n-1 for each tuple, since this
> is at the heart of the relational model.  Column names should still be
> optional, since many RDBMS will return unpredictable names (or none at
> all) for many types of expressions.

There must be some misunderstanding here... We were speaking of columns
returned in result sets by schema instrospection methods, not of cursors'
description attribute in general.  Those columns have to be defined in some
way, for exemple JDBC defines fixed names and meaning such as TABLE_CAT,
More generally I think we shouldn't touch at the existing API, only add an
extension (I guess everyone already agrees on this).

Hope this helps,

Ce service de mailing vous est offert par http://www.freesurf.fr.
FreeSurf, votre acces ADSL a partir de 29 euros/mois

More information about the DB-SIG mailing list