Rick Hillegas wrote: > >> I see this in section 8.3.4 >> >> "The JDBC type TINYINT represents an 8-bit integer value between 0 and >> 255 that may be signed or unsigned." >> >> > Hi Dan, > > I don't mean to pile up on you after your jet lag. Welcome back!
I wasn't back, it's that three day in jet-lag, but thanks anyway! I'm back now though. :-) > Yeah, that's the same sentence I saw. It's a bit oddly worded. The > "8-bit integer value" makes it sound like a byte. But "value between 0 > and 255 that may be signed or unsigned" could mean a "value between > -256 and 255", that is, a 9-bit quantity. I'm putting my faith in the > 8-bit part. So it seems there would be two choices: -128 to 127 : + matches JDBC 3.0 mapping to a byte (tables B.1/B.2) - does not match SQL Server, Sybase 0 to 255 : + matches SQL Server, Sybase - does not match JDBC 3.0 mapping to a byte Hmmmm, that's kind of an awkward place to be in. It seems you want to add this non-standard SQL type to match other databases, but by matching the other databases you break the JDBC spec. :-) MySQL seems to claim both ranges, but I didn't look to see how you specifiy signed vs. unsigned. Given MySQL's type handling in other areas I'm not sure they a a good "reference" implementation. Rick, you also, I think, said in one e-mail that Postgres supports TINYINT, I've only been able to find information that Postgres does not support TINYINT, do you have a link? Dan.
