BUG #1628: JDBC bug with regard to text column data type

Поиск
Список
Период
Сортировка
От Nathan Neuenschwander
Тема BUG #1628: JDBC bug with regard to text column data type
Дата
Msg-id 20050426190654.72BA9F107F@svr2.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #1628: JDBC bug with regard to text column data type  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1628
Logged by:          Nathan Neuenschwander
Email address:      nathan_neuenschwander@comcast.net
PostgreSQL version: 8.0
Operating system:   Win XP
Description:        JDBC bug with regard to text column data type
Details:

I am using a CachedRowSet, the JDBC driver for PG 8.0, and j2ee.
If the target table contains a column of data type text, the following
causes an SQLException with a message stating that a negative value was
returned for the column display size. If the text column is changed to a
varchar, the exception is not triggered. The exception is not dependent upon
the particular column being queried, just the enclosing table. (The proper
variable init is implied.)

SQL
# Create column with text data type.
Create Table table_a(field1 Integer, field2 text);

// Java
cachedrowset.setCommand("Select field2 from table_a");
cachedrowset.execute(connection); // Results in Exception.

SQL
# Create column with varchar data type.
Create Table table_b(field1 Integer, field2 varchar(100));

// Java
cachedrowset.setCommand("Select field2 from table_b");
cachedrowset.execute(connection); // No Exception.

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

Предыдущее
От: "deepak"
Дата:
Сообщение: BUG #1633: about transactions and row level locking
Следующее
От: Achilleus Mantzios
Дата:
Сообщение: Re: BUG #1632: Several jailed PostgreSQL instances.