I would like to get the columns that an index is on in PostgreSQL.
In MySQL you can use SHOW INDEXES FOR table and look at the Column_name
SHOW INDEXES FOR table
Column_name
\d tablename shows the column names for me on version 8.3.8.
\d tablename
"username_idx" UNIQUE, btree (username), tablespace "alldata1"