Unix Technical Forum

BUG #1523: precision column value returned from getTypeInfo() always has value 9

This is a discussion on BUG #1523: precision column value returned from getTypeInfo() always has value 9 within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1523 Logged by: Sergio Lob Email address: sergio_lob@iwaysoftware.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:37 AM
Sergio Lob
 
Posts: n/a
Default BUG #1523: precision column value returned from getTypeInfo() always has value 9


The following bug has been logged online:

Bug reference: 1523
Logged by: Sergio Lob
Email address: sergio_lob@iwaysoftware.com
PostgreSQL version: 8.0.1
Operating system: linux
Description: precision column value returned from getTypeInfo()
always has value 9
Details:

After calling Connection.DatabaseMetaData.getTypeInfo() method, the
PRECISION column of the ResultSet seems hardcoded to value 9, which of
course in incorrect

To repro:
1. connect to a PostgresSQL JDBC data source
2. Invoke Connection.getMetaData() on that connection to get
DatabaseMetaData object
3. Invoke DataBaseMetaData.getTypeInfo() to get ResultSet of all supported
data types
4. Invoke ResultSet.next() to get to first row
5. Invoke ResultSet.getString(3) to get PRECISION column value for current
row. Notice that no matter what row is checked in the answer set, precision
of data type is ALWAYS 9.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:37 AM
Oliver Jowett
 
Posts: n/a
Default Re: BUG #1523: precision column value returned from getTypeInfo()

(cc'ing -jdbc)

Sergio Lob wrote:

> After calling Connection.DatabaseMetaData.getTypeInfo() method, the
> PRECISION column of the ResultSet seems hardcoded to value 9, which of
> course in incorrect


Well, it's working as intended in the sense that there is no code to
support retrieving a real precision value -- it is indeed a hardcoded
placeholder value. I'm not sure why '9' off the top of my head, perhaps
making that column NULL would be better? What are the units of this
value anyway?

If you're willing to do the implementation work to improve this, then
post a patch to pgsql-jdbc and I can look at applying it.

-O

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com