Andreas Pflug <pgadmin@pse-consulting.de> writes:
> I noticed the new expression functionality of indices and while
> implementing them in pgadmin3 was wonderingnow to extract the definition
> from the catalog.
The best way is to use pg_get_indexdef(indexOID), same as pg_dump and
psql do.
> CREATE INDEX foo ON bar (numcol, length(txtcol), intcol2,
> length(txtcol2))
> indkey will contain 1 0 4
Actually it should be read as 1 0 4 0. The output converter for
int2vector suppresses trailing zeroes, for largely-historical reasons.
regards, tom lane