@@ -1854,7 +1854,7 @@ public java.sql.ResultSet getProcedureColumns(String catalog, String schemaPatte
1854
1854
1855
1855
// decide if we are returning a single column result.
1856
1856
if (!returnTypeType .equals ("c" )) {
1857
- byte [][]tuple =new byte [13 ][0 ];
1857
+ byte [][]tuple =new byte [13 ][];
1858
1858
tuple [0 ] =null ;
1859
1859
tuple [1 ] =schema ;
1860
1860
tuple [2 ] =procedureName ;
@@ -1874,7 +1874,7 @@ public java.sql.ResultSet getProcedureColumns(String catalog, String schemaPatte
1874
1874
// Add a row for each argument.
1875
1875
for (int i =0 ;i <argTypes .size ();i ++) {
1876
1876
int argOid = ((Integer )argTypes .elementAt (i )).intValue ();
1877
- byte [][]tuple =new byte [13 ][0 ];
1877
+ byte [][]tuple =new byte [13 ][];
1878
1878
tuple [0 ] =null ;
1879
1879
tuple [1 ] =schema ;
1880
1880
tuple [2 ] =procedureName ;
@@ -1897,7 +1897,7 @@ public java.sql.ResultSet getProcedureColumns(String catalog, String schemaPatte
1897
1897
ResultSet columnrs =connection .createStatement ().executeQuery (columnsql );
1898
1898
while (columnrs .next ()) {
1899
1899
int columnTypeOid =columnrs .getInt ("atttypid" );
1900
- byte [][]tuple =new byte [13 ][0 ];
1900
+ byte [][]tuple =new byte [13 ][];
1901
1901
tuple [0 ] =null ;
1902
1902
tuple [1 ] =schema ;
1903
1903
tuple [2 ] =procedureName ;
@@ -2199,7 +2199,7 @@ public java.sql.ResultSet getTableTypes() throws SQLException
2199
2199
f [0 ] =new Field (connection ,new String ("TABLE_TYPE" ),iVarcharOid ,getMaxNameLength ());
2200
2200
for (i =0 ;i <types .length ;i ++)
2201
2201
{
2202
- byte [][]tuple =new byte [1 ][0 ];
2202
+ byte [][]tuple =new byte [1 ][];
2203
2203
tuple [0 ] =types [i ].getBytes ();
2204
2204
v .addElement (tuple );
2205
2205
}
@@ -2318,7 +2318,7 @@ public java.sql.ResultSet getColumns(String catalog, String schemaPattern, Strin
2318
2318
ResultSet rs =connection .createStatement ().executeQuery (sql );
2319
2319
while (rs .next ())
2320
2320
{
2321
- byte [][]tuple =new byte [18 ][0 ];
2321
+ byte [][]tuple =new byte [18 ][];
2322
2322
int typeOid =rs .getInt ("atttypid" );
2323
2323
2324
2324
tuple [0 ] =null ;// Catalog name, not supported
@@ -2329,6 +2329,11 @@ public java.sql.ResultSet getColumns(String catalog, String schemaPattern, Strin
2329
2329
String pgType =connection .getPGType (typeOid );
2330
2330
tuple [5 ] =pgType .getBytes ();// Type name
2331
2331
2332
+ // by default no decimal_digits
2333
+ // if the type is numeric or decimal we will
2334
+ // overwrite later.
2335
+ tuple [8 ] ="0" .getBytes ();
2336
+
2332
2337
if (pgType .equals ("bpchar" ) ||pgType .equals ("varchar" ))
2333
2338
{
2334
2339
int atttypmod =rs .getInt ("atttypmod" );
@@ -2465,7 +2470,7 @@ public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, Str
2465
2470
for (int j =0 ;j <grantees .size ();j ++) {
2466
2471
String grantee = (String )grantees .elementAt (j );
2467
2472
String grantable =owner .equals (grantee ) ?"YES" :"NO" ;
2468
- byte [][]tuple =new byte [8 ][0 ];
2473
+ byte [][]tuple =new byte [8 ][];
2469
2474
tuple [0 ] =null ;
2470
2475
tuple [1 ] =schemaName ;
2471
2476
tuple [2 ] =tableName ;
@@ -2567,7 +2572,7 @@ public java.sql.ResultSet getTablePrivileges(String catalog, String schemaPatter
2567
2572
for (int j =0 ;j <grantees .size ();j ++) {
2568
2573
String grantee = (String )grantees .elementAt (j );
2569
2574
String grantable =owner .equals (grantee ) ?"YES" :"NO" ;
2570
- byte [][]tuple =new byte [7 ][0 ];
2575
+ byte [][]tuple =new byte [7 ][];
2571
2576
tuple [0 ] =null ;
2572
2577
tuple [1 ] =schema ;
2573
2578
tuple [2 ] =table ;
@@ -2819,7 +2824,7 @@ public java.sql.ResultSet getVersionColumns(String catalog, String schema, Strin
2819
2824
f [6 ] =new Field (connection ,"DECIMAL_DIGITS" ,iInt2Oid ,2 );
2820
2825
f [7 ] =new Field (connection ,"PSEUDO_COLUMN" ,iInt2Oid ,2 );
2821
2826
2822
- byte tuple [][] =new byte [8 ][0 ];
2827
+ byte tuple [][] =new byte [8 ][];
2823
2828
2824
2829
/* Postgresql does not have any column types that are
2825
2830
* automatically updated like some databases' timestamp type.