|
From: Frederic G. <fgo...@fr...> - 2005-11-19 17:29:36
|
Markus Hoenicka wrote: > Hi, > > Frederic Gonieaux writes: > > Hi, > > > > Most of the dbi drivers don't handle correctly the column types > > unsigned int and unsigned long long. > > > > SQL does not support unsigned integers. Unsigned integers are a MySQL > extension of the standard and as such not portable. At least SQLite, > PostgreSQL, and Firebird do not use unsigned integers (maybe Oracle > does, I don't know). > The current behaviour emulates unsigned integers in a portable way > which works across all supported database engines. It is questionable > whether your mysql driver patch would offer that much benefit as the > extended range of unsigned integers would be limited to users of that > driver. > I'm open for discussions whether this is a useful feature or not. Ok, I didn't know that, please excuse my newbiness. Using libdbi for a school project, I've only tried my code on MySQL so far. I was actually confused by the functions dbi_result_get_uint, dbi_result_get_ulong, dbi_result_get_ulonglong. I was expecting that these functions return full unsigned integers, well at least for MySQL. IMO, it would be a good thing to make clear the behavior of these functions in the documentation. I think portability shouldn't be dictated by the library. That way, we can optimize for certain databases, and still keep compatibility with others. Take care. |