Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Table/Column comments missing in jdbc-DatabaseMetaData

422381May 31 2004 — edited Jun 16 2004
Hi,
For documentation reasons, I am an advocate of using the 'comment on' command for tables and columns on database objects; it allows to add comments on tables and individual columns and thus helps document the whole system.

However, it seems, that these remarks for the tables are not passed to
the java.sql.DatabaseMetaData getTables() ResultSet: it should be in Column 5 of the getTables() result. Same for the getColumns() result: there the 'remark' should be in Column 12. The remark-column for the tables and columns simply return 'null' (i.e. watch the 'remarks' column from the 'tables' command of the HenPlus JDBC-SQL shell: http://henplus.sourceforge.net/)

Right now it seems, that the only way to read the comments is to select from USER_COL_COMMENTS and USER_TAB_COMMENTS directly which is I want to avoid since it is database dependent.

I assume, this just has been neglected by the JDBC driver (I am using a 9.2.0.3 JDBC-Driver) or does anybody know, if this can be switched on ? If not, I'd regard this as bug in the driver, esp. since it would probably be very little effort to provide these columns since all information is already there.

Since I am a developer in a project using the Oracle Database and not a customer of Oracle, I don't have access to the bug database and thus don't know if there has been a bug for this submitted. Does anyone know more details ?

ciao,
Henner.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 14 2004
Added on May 31 2004
3 comments
1,399 views