db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-194) getPrecision() on TIME and TIMESTAMP is zero
Date Wed, 01 Jun 2005 16:54:04 GMT
     [ http://issues.apache.org/jira/browse/DERBY-194?page=all ]

A B updated DERBY-194:

    Attachment: derby-194.stat

Attaching a patch for this issue.

Since the definitions of "precision" and "scale" aren't clearly defined for datetime values
in JDBC, I've set them based on the ODBC specification.  It was agreed in discussion of this
issue (and also of DERBY-319) that the "intent" of JDBC for these values is to mimic ODBC
behavior.  See the thread here for that discussion:


> 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
>     Assignee: A B
>     Priority: Minor
>  Attachments: derby-194.patch, derby-194.stat
> 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). 
> http://docs.sun.com/source/816-6105-10/apicola.htm#211083
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message