[DB-SIG] Type code mappings: expanding the type objects

Federico Di Gregorio fog at initd.org
Tue Jan 6 07:09:06 EST 2004


Il mar, 2004-01-06 alle 11:51, M.-A. Lemburg ha scritto:
[snip]
> plus a few more exotic ones that are ODBC cruft. The WCHAR ones
> are Unicode string columns.
> 
> Most of these are SQL92 names for the types, perhaps we should
> stick to them ?!

i think sticking to SQL92 names would be the right thing. here is a
reorganized tree. note that i don't have an SQL reference at hand so
some of the type names can be wrong (just copied marc's).

STRING
|__CHAR
|__VARCHAR
|__LONGVARCHAR
|__TEXT
|__WCHAR
|__WVARCHAR
|__WLONGVARCHAR
BINARY
|__VARBINARY
|__LONGVARBINARY
NUMBER
|__BIT
|__INTEGER
|__SMALLINT
|__BIGINT
|__FLOAT
|__DOUBLE
|__REAL
|__DECIMAL
|__MONEY
|__COMPLEX
|__BOOLEAN
DATETIME
|__DATE
|__TIME
|__TIMESTAMP
|__INTERVAL
|__TZTIME
|__TZTIMESTAMP
ROWID

some open questions:

  1/ CHAR is under STRING or under NUMBER?
  2/ there are real differences between VARCHAR and LONGVARCHAR?
     (i never found a db that has this difference and we don't want
     to include types just because they are defined in SQL92 right?)
  3/ same for VARBINARY and LONGVARBINARY
  4/ are MONEY and DECIMAL the same thing? (both are fixed-point, 
     right?)
  5/ in spite of SQL92 i renamed WCHAR_XXX -> WXXX, the other name
     is terrible :)
  6/ where do we put BOOLEAN for compatibility under NUMBER; but
     IMHO it should have a top-level place in its own.
  7/ is TEXT just LONGVARCHAR?
 
-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog at debian.org
INIT.D Developer                                           fog at initd.org
                      The number of the beast: vi vi vi. -- Delexa Jones
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata
Url : http://mail.python.org/pipermail/db-sig/attachments/20040106/1e302dda/attachment.bin


More information about the DB-SIG mailing list