code: func PgIndexColumns(db XODB, schema string, index string) ([]*IndexColumn, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`(row_number() over()), ` + // ::integer AS seq_no
  		`a.attnum, ` + // ::integer AS cid
  		`a.attname ` + // ::varchar AS column_name
  		`FROM pg_index i ` +
  		`JOIN ONLY pg_class c ON c.oid = i.indrelid ` +
  		`JOIN ONLY pg_namespace n ON n.oid = c.relnamespace ` +
  		`JOIN ONLY pg_class ic ON ic.oid = i.indexrelid ` +
  		`LEFT JOIN pg_attribute a ON i.indrelid = a.attrelid AND a.attnum = ANY(i.indkey) AND a.attisdropped = false ` +
  		`WHERE i.indkey <> '0' AND n.nspname = $1 AND ic.relname = $2`
  
  	// run query
  	XOLog(sqlstr, schema, index)
  	q, err := db.Query(sqlstr, schema, index)
  	if err != nil {
  		return nil, err
  	}
  	defer q.Close()
  
  	// load results
  	res := []*IndexColumn{}
  	for q.Next() {
  		ic := IndexColumn{}
  
  		// scan
  		err = q.Scan(&ic.SeqNo, &ic.Cid, &ic.ColumnName)
  		if err != nil {
  			return nil, err
  		}
  
  		res = append(res, &ic)
  	}
  
  	return res, nil
  }
docs: // PgIndexColumns runs a custom query, returning results as IndexColumn.