DatabaseMetaData.getColumns does not return COLUMN_DEF

Issue #14 resolved
Grace Batumbya
created an issue


Reported by, Jun 2, 2012 What steps will reproduce the problem? Create a table: create table t (a datetime default CURRENT_TIMESTAMP, b text)

Then call DatabaseMetaData getColumns DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getColumns(null, null, "t", null);

while ( { look at rs.getString("COLUMN_NAME") and rs.getString("COLUMN_DEF") // FOR column 'a' this should not be null }

What is the expected output? What do you see instead? The JDBC spec says that COLUMN_DEF should contain a value if the column has a default. In the case of H2 it shows 'CURRENT_TIMESTAMP()'

What version of the product are you using? On what operating system? Java 6, sqlite 3.7.3

Comments (2)

  1. Log in to comment