On Fri, 18 Feb 2005, peter royal wrote:
> create index my_index on my_Table (upper(my_field) );
>
> it is possible to retrieve the fact that the field is upper(my_field)
> via DMD.getIndexInfo() ?
>
> With 7.4 (and the associated JDBC driver) the column name shows up as
> pg_expression_1 (or something very close to that
This is what is actually stored in the pg_attribute table as the column
name for the index. Determining what the actual expression is would
involve decoding the pg_index.indexpr column with pg_get_expr, which could
be done, but then some manual parsing would need to be done to split this
into multiple columns for something like (upper(a), lower(b)). So the
driver can figure this information out, but doesn't presently.
Kris Jurka