|
When this get fixed, the PRECISION field of Metadata.getTypeInfo should also be changed to match.
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 here?
A B made changes - 27/May/05 06:24 AM
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 http://article.gmane.org/gmane.comp.apache.db.derby.devel/2786 http://article.gmane.org/gmane.comp.apache.db.derby.devel/2787
A B made changes - 02/Jun/05 01:51 AM
A B made changes - 02/Jun/05 01:51 AM
A B made changes - 03/Jun/05 06:10 AM
Patch was committed with svn revision 179839. I tried to "Resolve" this issue with a comment, but something went wrong with JIRA so I don't think it went through. That said, the "resolve" option is no longer available, so I guess "close" is the next option. SO, George Baklarz, if you can do an "svn update" and then confirm that the problem has been fixed, please post saying so and I will close this issue...Thanks.
Reopening to fix resolved field in JIRA.
Andrew McIntyre made changes - 04/Jun/05 03:50 PM
Patch was committed with svn revision 179839. Could Army or George please verify this is fixed and close?
Andrew McIntyre made changes - 04/Jun/05 03:51 PM
A B made changes - 08/Jun/05 08:03 AM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DERBY-107), and this is one that I too have noticed.Fix is to change the "setTypeIdSpecificInstanceVariables()" method in org/apache/derby/iapi/types/TypeId.java to set the "maxMaxWidth" variable to be the correct value (namely, 8 for TIME (hh:mm:ss) and 26 for TIMESTAMP (yyyy-mm-dd hh:mm:ss.ffffff)).
Unless someone wants to create a specific patch for this, I'll submit this fix as part of another patch that I'm writing--one that will make Derby metadata return the correct value for the BUFFER_LENGTH field for builtin (including datetime) types. See the thread here for more on the BUFFER_LENGTH issue: http://mail-archives.eu.apache.org/mod_mbox/db-derby-dev/200503.mbox/%3c42449744.8010109@sbcglobal.net%3e