db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance J. Andersen" <Lance.Ander...@Sun.COM>
Subject Re: [jira] Commented: (DERBY-194) getPrecision() on TIME and TIMESTAMP is zero
Date Mon, 04 Apr 2005 21:13:38 GMT
We have been having a  similar discussion in the JDBC 4.0 EG group 
regarding the DatabaseMetaData.getTypeInfo PRECISION column.

The intent  of the JDBC spec was to match the behavior specified for ODBC.

I will bring this up as a point to clarify for JDBC 4.0 in the EG..


Daniel John Debrunner (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/DERBY-194?page=comments#action_62141 ]
>Daniel John Debrunner commented on DERBY-194:
>While the JDBC spec does say 'length', it does not explictly say what length is being
referred to. Length of the object as a String, length of the stored form of the value, maximum
length of the Java serialized form of getObject or something else?
>Is there any clarification in the JDBC tutorial book, or is returning NULL a better option
>>getPrecision() on TIME and TIMESTAMP is zero
>>         Key: DERBY-194
>>         URL: http://issues.apache.org/jira/browse/DERBY-194
>>     Project: Derby
>>        Type: Bug
>>  Components: JDBC
>>    Versions:
>> Environment: Windows XP SP1 Professional
>>    Reporter: George Baklarz
>>    Priority: Minor
>>Sun JDBC defines getPrecision() to return either the maximum length or maximum number
of digits of the column, or zero for failure (such as the precision is unknown). 
>>The DATE field returns 10 characters on a getPrecision() call so why doesn't TIME
and TIMESTAMP give a precision length equal to the display length? Just seems inconsistent
that DATE would return a precision (as well as all other data types) and not TIME nor TIMESTAMP.

View raw message