Skip site navigation (1) Skip section navigation (2)

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

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <oliver(at)opencloud(dot)com>, <dubochet(at)urbanet(dot)ch>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1712: JDBC column precision for bigint is 0
Date: 2005-06-14 14:20:25
Message-ID: s2aea164.069@gwmta.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
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

>>> 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 :(


pgsql-bugs by date

Next:From: Tom LaneDate: 2005-06-14 14:23:24
Subject: Re: BUG #1718: geqo_selection.c:linear()
Previous:From: Bug FinderDate: 2005-06-14 08:07:41
Subject: BUG #1718: geqo_selection.c:linear()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group