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
\d table_name
shows this information from psql
, but if you want to get such information from database using SQL then have a look at Extracting META information from PostgreSQL.
I use such info in my utility to report some info from db schema to compare PostgreSQL databases in test and production environments.