dbTalk Databases Forums  

Re: [BUGS] BUG #1712: JDBC column precision for bigint is 0

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #1712: JDBC column precision for bigint is 0 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kevin Grittner
 
Posts: n/a

Default Re: [BUGS] BUG #1712: JDBC column precision for bigint is 0 - 06-14-2005 , 09:22 AM






I agree on all counts. The only way that I would extend the description
of "the number of decimal digits" is that I think it's fairly clear that
for floating point numbers it should be "the number of significant
digits" since the fractional part is often only an approximation of any
decimal representation, and its representation could go on forever.

java.util.Date and its java.sql subclasses have well defined formats.
No elaboration with the precision is required, and I've never seen any
hint that it is intended to apply.

As someone tasked with keeping a software framework functional and
efficient with multiple database products through standard JDBC, I often
find myself dealing with different vendor interpretations of the softer
parts of the JDBC spec. Each vendor is understandably reluctant to
switch from a plausible interpretation they've already implemented to
someone else's interpretation.

-Kevin

Quote:
Oliver Jowett <oliver (AT) opencloud (DOT) com> 06/13/05 4:57 PM
Actually, I just dug through the JDBC javadoc, and noticed that
ResultSetMetaData.getPrecision() does talk about the number of decimal
digits; but in all the other places it's used (such as DatabaseMetaData)
it's not described.

For numeric types using number of decimal digits seems reasonable since
it's consistent with the NUMERIC type's precision/scale information.

Previous reports of this also wanted to provide precision for dates and
times according to the number of digits in them, which seems much more
dubious.

I guess it's another case of the JDBC specification being woefully
underspecified


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.