(http://www.ideit.com/products/dbvis/) to work with Postgresql and I found
out the following bug: if database has views then getTables() gets the null
pointer exception ('order by relname' makes the listing tree in
DbVisualizer a lot useful !!)
This patch should propably be applied to the the jdbc1's
DatabaseMetaData.java, too.
Panu Outinen
case 'S':
relKind = "SEQUENCE";
break;
+ case 'v':
+ relKind = "VIEW";
+ break;
default:
relKind = null;
}
tuple[0] = null; // Catalog name
tuple[1] = null; // Schema name
tuple[2] = r.getBytes(1); // Table name
- tuple[3] = relKind.getBytes(); // Table type
+ tuple[3] = (relKind==null) ? null : relKind.getBytes(); // Table type
tuple[4] = remarks; // Remarks
v.addElement(tuple);
}
case 'S':
relKind = "SEQUENCE";
break;
+ case 'v':
+ relKind = "VIEW";
+ break;
default:
relKind = null;
}
tuple[0] = null; // Catalog name
tuple[1] = null; // Schema name
tuple[2] = r.getBytes(1); // Table name
- tuple[3] = relKind.getBytes(); // Table type
+ tuple[3] = (relKind==null) ? null : relKind.getBytes(); // Table type
tuple[4] = remarks; // Remarks
v.addElement(tuple);
}