JDBC driver reports column size of -1 !?

Поиск
Список
Период
Сортировка
От M. A. Sridhar
Тема JDBC driver reports column size of -1 !?
Дата
Msg-id 20030106010707.22371.qmail@web40403.mail.yahoo.com
обсуждение исходный текст
Ответы Re: JDBC driver reports column size of -1 !?
Список 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@yahoo.com

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Jim Downing
Дата:
Сообщение: Idle in Transaction
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Idle in Transaction