Bug: getColumns returns bad data for numeric types in 7.3.2

Поиск
Список
Период
Сортировка
От Michael L. Gantz
Тема Bug: getColumns returns bad data for numeric types in 7.3.2
Дата
Msg-id 3E5B836D.9080803@barcodesolutions.com
обсуждение исходный текст
Ответы Re: Bug: getColumns returns bad data for numeric types in
Список pgsql-jdbc
The metadata method getColumns is returning bad data for numeric types.
  If I apply the following patch it fixes the problem.  Could someone
confirm this and have whoever tracks this piece of code apply this patch?

Short version :

2340c2340
<                               int attypmod = rs.getInt(8) - VARHDRSZ;
---
 >                               int attypmod = rs.getInt(6) - VARHDRSZ;


Context version :

*** AbstractJdbc1DatabaseMetaData.java.old      Mon Feb 24 18:04:03 2003
--- AbstractJdbc1DatabaseMetaData.java  Mon Feb 24 18:03:47 2003
***************
*** 2337,2343 ****
                         }
                         else if (pgType.equals("numeric") ||
pgType.equals("decimal"))
                         {
!                               int attypmod = rs.getInt(8) - VARHDRSZ;
                                 tuple[6] = Integer.toString( ( attypmod
 >> 16 ) & 0xffff ).getBytes();
                                 tuple[8] = Integer.toString(attypmod &
0xffff).getBytes();
                                 tuple[9] = "10".getBytes();
--- 2337,2343 ----
                         }
                         else if (pgType.equals("numeric") ||
pgType.equals("decimal"))
                         {
!                               int attypmod = rs.getInt(6) - VARHDRSZ;
                                 tuple[6] = Integer.toString( ( attypmod
 >> 16 ) & 0xffff ).getBytes();
                                 tuple[8] = Integer.toString(attypmod &
0xffff).getBytes();
                                 tuple[9] = "10".getBytes();





Thanks,
Michael L. Gantz




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

Предыдущее
От: "Agrawal, Manish"
Дата:
Сообщение: Re: PgAdmin problem
Следующее
От: Barry Lind
Дата:
Сообщение: Re: Bug: getColumns returns bad data for numeric types in