OSDN Git Service

applied Kris Jurka's patch for numeric
authorDave Cramer <davec@fastcrypt.com>
Fri, 7 Feb 2003 12:47:29 +0000 (12:47 +0000)
committerDave Cramer <davec@fastcrypt.com>
Fri, 7 Feb 2003 12:47:29 +0000 (12:47 +0000)
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java

index 9e217f7..0d0ba7f 100644 (file)
@@ -2352,7 +2352,7 @@ public abstract class AbstractJdbc1DatabaseMetaData
                        }
                        else if (pgType.equals("numeric") || pgType.equals("decimal")) 
                        {
-                               int attypmod = rs.getInt(8) - VARHDRSZ;
+                               int attypmod = rs.getInt("atttypmod") - VARHDRSZ;
                                tuple[6] = Integer.toString( ( attypmod >> 16 ) & 0xffff ).getBytes();
                                tuple[8] = Integer.toString(attypmod & 0xffff).getBytes();
                                tuple[9] = "10".getBytes();