Subject DataBaseMetada.getIndexInfo() does not return all indexes
Author Thomas
Hi,

consider the following table:

CREATE TABLE T (caption varchar(50));
CREATE INDEX idx_capt_upper ON t computed by (upper(caption));

When calling

conection.getMetaData().getIndexInfo(null, null, "T", true, false);

the result set will be empty.

I had a look at the driver source and the statement that is being used to return all indizes does an inner join on rdb$indices and rdb$index_segments

An index with "computed by" does not seem to have a row in rdb$index_segments and the join fails.

When changing the statement to use an outer join, the above index will be returned.

Of course the NULL values for rdb$field_position and rdb$field_name from rdb$index_segments needs to be taken into account.