Export to GitHub

sqlite-jdbc - issue #27

DatabaseMetaData.getColumns does not return COLUMN_DEF


Posted on Jun 2, 2012 by Happy Kangaroo

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 (rs.next()) { 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

Comment #1

Posted on Sep 8, 2012 by Quick Panda

Moved to bitbucket issue: https://bitbucket.org/xerial/sqlite-jdbc/issue/14

Comment #2

Posted on Sep 9, 2012 by Quick Panda

Fixed on by: https://bitbucket.org/xerial/sqlite-jdbc/changeset/119b69e28c1b

Comment #3

Posted on Sep 9, 2012 by Happy Kangaroo

Thanks!

Comment #4

Posted on Sep 10, 2012 by Quick Panda

The change for this is done now.

Status: Fixed

Labels:
Type-Defect Priority-Medium AffectedVersion-3.7.x FixedVersion-NA