From: | "M(dot) A(dot) Sridhar" <m_a_sridhar(at)yahoo(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | JDBC driver reports column size of -1 !? |
Date: | 2003-01-06 01:07:07 |
Message-ID: | 20030106010707.22371.qmail@web40403.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi folks,
I have a code fragment that looks something like this:
DatabaseMetaData mtd = connection.getMetaData();
ResultSet columns = mtd.getColumns (null, "%", tableName, "%");
for (int i = 0; columns.next(); i++) {
String columnName = columns.getString ("COLUMN_NAME");
int dataSize = columns.getInt ("COLUMN_SIZE");
// .... other stuff here....
}
The dataSize parameter gets the value -1 for numeric columns, although it is
correctly reported for characters and varchars. I'm beginning to believe this
is a driver bug, because the same code returns positive sizes when run
against an Oracle database. Even DbVisualizer (from http://www.minq.se/)
shows a negative column size. Can anyone help?
FYI, I'm using the 7.2 JDBC2 driver. (I can't use the 7.3 driver because of
the objsubid bug that was recently discussed on the list.)
Thanks in advance.
=====
------
M. A. Sridhar
m_a_sridhar(at)yahoo(dot)com
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2003-01-06 03:03:38 | Re: Idle in Transaction |
Previous Message | Jim Downing | 2003-01-05 17:00:39 | Idle in Transaction |