As I understand it the value of TINYINT is:

- Enables of migration of applications to Derby
- Allows for better use of storage (which goes in line with our "small footprint" goal)

The reason against it is it is a non-standard SQL type. But don't we already have things in Derby that are not part of the SQL standard?

Thanks,

David

Lance J. Andersen wrote:


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. :-)
I do not see how this is going to break anything. The JDBC spec indicates should, not "must".

As the other doc points out you could use either a short or a byte based on your needs.


setbyte() will work if the value is in range for the database which means it has to be non-negative for TINYINT in the case of Sybase.



setShort() will also work for a TINYINT as long as the value is in range.


So i guess i am not sure of your concern dan. This datatype has worked fine for drivers which have supported Sybase and MS SQL server for years.

Assuming there is agreement to add TINYINT, i would add it to be compatible with Sybase and MS SQL Server.


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.






begin:vcard
fn:David W Van Couvering
n:Van Couvering;David W
org:Sun Microsystems, Inc.;Database Technology Group
email;internet:[EMAIL PROTECTED]
title:Senior Staff Software Engineer
tel;work:510-550-6819
tel;cell:510-684-7281
x-mozilla-html:TRUE
version:2.1
end:vcard

Reply via email to