RE: [Classifier4j-devel] Training and Classifying
Status: Beta
Brought to you by:
nicklothian
From: Nick L. <nl...@es...> - 2004-05-18 23:55:05
|
> > Hi Nick, > > > Is PostgreSQL case sensitive with respect to table names? > > PostgreSQL is not case-sensitive - I have tested this. > Are you sure about this? There seems to be a fair bit of discussion about the inability to switch it off: <http://forums.devshed.com/archive/t-44274> > > If that doesn't help, can please send the result set > returned from the > > following code: > > > > DatabaseMetaData dbm = con.getMetaData(); > > ResultSet rs = dbm.getTables(null, null, "word_probability", null); > > I'm not too sure what you mean when you say to "send the > result set" to > you. > What method should I call on the ResultSet. > > When I do: > ResultSetMetaData rM = rs.getMetaData(); > String name = rM.getColumnName(2); > > The value of name is "table_schem". Shouldn't it be one of > the names of > the columns in the word_probability table?? > No. The getTables(..) call gets data about the tables that exist in the database. See <http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getT ables(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang. String[])> Could you please run code like System.out.println("word_probability (in lower case) Result Set:"); DatabaseMetaData dbm = con.getMetaData(); ResultSet rs = dbm.getTables(null, null, "word_probability", null); while (rs.next()) { System.out.println("TABLE_CAT = " + rs.getString("TABLE_CAT")); System.out.println("TABLE_SCHEM = " + rs.getString("TABLE_SCHEM")); System.out.println("TABLE_NAME = " + rs.getString("TABLE_NAME")); System.out.println("TABLE_TYPE = " + rs.getString("TABLE_TYPE")); System.out.println("REMARKS = " + rs.getString("REMARKS")); System.out.println("TYPE_CAT = " + rs.getString("TYPE_CAT")); System.out.println("TYPE_SCHEM = " + rs.getString("TYPE_SCHEM")); System.out.println("TYPE_NAME = " + rs.getString("TYPE_NAME")); System.out.println("SELF_REFERENCING_COL_NAME = " + rs.getString("SELF_REFERENCING_COL_NAME")); System.out.println("REF_GENERATION = " + rs.getString("REF_GENERATION")); } System.out.println("End of Result Set"); rs.close(); System.out.println("WORD_PROBABILITY (in UPPER case) Result Set:"); dbm = con.getMetaData(); rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); while (rs.next()) { System.out.println("TABLE_CAT = " + rs.getString("TABLE_CAT")); System.out.println("TABLE_SCHEM = " + rs.getString("TABLE_SCHEM")); System.out.println("TABLE_NAME = " + rs.getString("TABLE_NAME")); System.out.println("TABLE_TYPE = " + rs.getString("TABLE_TYPE")); System.out.println("REMARKS = " + rs.getString("REMARKS")); System.out.println("TYPE_CAT = " + rs.getString("TYPE_CAT")); System.out.println("TYPE_SCHEM = " + rs.getString("TYPE_SCHEM")); System.out.println("TYPE_NAME = " + rs.getString("TYPE_NAME")); System.out.println("SELF_REFERENCING_COL_NAME = " + rs.getString("SELF_REFERENCING_COL_NAME")); System.out.println("REF_GENERATION = " + rs.getString("REF_GENERATION")); } System.out.println("End of Result Set"); rs.close(); (Note that this hasn't been tested, but it should pretty close) |