pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: ldhasson (@ldhasson) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] issue #3467: DatabaseMetaData.getIndexInfo() doesn't return "REMARKS" property
Date: Sun, 22 Dec 2024 17:32:20 +0000
Message-ID: <[email protected]> (raw)
Please read https://stackoverflow.com/help/minimal-reproducible-example
**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:
```sql
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:
```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:
```log
- 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.
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #3467: DatabaseMetaData.getIndexInfo() doesn't return "REMARKS" property
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox