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

Federico Di Gregorio fog at initd.org
Thu Jan 8 05:26:44 EST 2004


another list, amended with marc's comments. if everybody agrees on this
list i'll go on and write the new paragraph for the PEP document.

changes:

  1/ removed TEXT in favor of LONGVARCHAR;

  2/ removed MONEY (DECIMAL is the name for fixed point), backends
     providing currency information will define a sub-type of decimal,
     right?

  3/ BOOLEAN is under NUMBER (this will probably give some problems to
     postgresql and other db using 't' and 'f' but there is really no
     simple solution and Python *do* use 1 and 0 for True and False (at
     least untill 2.3)

i tought about using three or four levels:

STRING
|__VARCHAR
   |__LONGVARCHAR

but i really don't see any improvement. the two-level hierarchy is there
for _backward compatibility_, not for organizing the tree. does this
make sense?

here is the list:

 STRING
 |__CHAR
 |__VARCHAR
 |__LONGVARCHAR
 |__TEXT
 |__WCHAR
 |__WVARCHAR
 |__WLONGVARCHAR
 BINARY
 |__VARBINARY
 |__LONGVARBINARY
 NUMBER
 |__BIT
 |__INTEGER
 |__SMALLINT
 |__BIGINT
 |__FLOAT
 |__DOUBLE
 |__REAL
 |__DECIMAL
 |__COMPLEX
 |__BOOLEAN
 DATETIME
 |__DATE
 |__TIME
 |__TIMESTAMP
 |__INTERVAL
 |__TZTIME
 |__TZTIMESTAMP
 ROWID
 
-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog at debian.org
INIT.D Developer                                           fog at initd.org
  Gli esseri umani, a volte, sono destinati, per il solo fatto di
   esistere, a fare del male a qualcuno.              -- Haruki Murakami
-------------- 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/20040108/0a451074/attachment.bin


More information about the DB-SIG mailing list