-
Notifications
You must be signed in to change notification settings - Fork 918
Closed
Description
Describe the issue
Querying the meta-data for indices doesn't return the comment. A property called "REMARKS" is expected as for tables, views and columns.
Driver Version?
postgresql-42.7.4.jar
Java Version?
21
OS Version?
Windows 11
PostgreSQL Version?
PostgreSQL 15.1
PostgreSQL 17.1
To Reproduce
Database:
CREATE TABLE Test_XXX(id BIGINT);
CREATE UNIQUE INDEX IF NOT EXISTS Test_XXX_main ON Test_XXX("id" ASC) where id > 0;
COMMENT ON INDEX Test_XXX_main IS E'Blah blah blah';Java:
DatabaseMetaData meta = C.getMetaData();
ResultSet RS = meta.getIndexInfo(null, null, "test_xxx", false, true);
while (RS.next() == true)
{
int count = RS.getMetaData().getColumnCount();
for (int i = 1; i <= count; ++i)
{
String Name = RS.getMetaData().getColumnName(i);
String Val = RS.getString(i);
System.out.println(" - "+Name+": "+Val);
}
}Output:
- TABLE_CAT: null
- TABLE_SCHEM: public
- TABLE_NAME: test_xxx
- NON_UNIQUE: t
- INDEX_QUALIFIER: null
- INDEX_NAME: test_xxx_main
- TYPE: 3
- ORDINAL_POSITION: 1
- COLUMN_NAME: id
- ASC_OR_DESC: A
- CARDINALITY: 0
- PAGES: 1
- FILTER_CONDITION: (id > 0)
Expected behaviour
The meta-data should return a property called "REMARKS" containing the comment on the index.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels