code: func PgIndexByIndexrelid(db XODB, indexrelid pgtypes.Oid) (*PgIndex, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, ctid, indexrelid, indrelid, indnatts, indisunique, indisprimary, indisexclusion, indimmediate, indisclustered, indisvalid, indcheckxmin, indisready, indislive, indisreplident, indkey, indcollation, indclass, indoption, indexprs, indpred ` +
  		`FROM pg_catalog.pg_index ` +
  		`WHERE indexrelid = $1`
  
  	// run query
  	XOLog(sqlstr, indexrelid)
  	pi := PgIndex{}
  
  	err = db.QueryRow(sqlstr, indexrelid).Scan(&pi.Tableoid, &pi.Cmax, &pi.Xmax, &pi.Cmin, &pi.Xmin, &pi.Ctid, &pi.Indexrelid, &pi.Indrelid, &pi.Indnatts, &pi.Indisunique, &pi.Indisprimary, &pi.Indisexclusion, &pi.Indimmediate, &pi.Indisclustered, &pi.Indisvalid, &pi.Indcheckxmin, &pi.Indisready, &pi.Indislive, &pi.Indisreplident, &pi.Indkey, &pi.Indcollation, &pi.Indclass, &pi.Indoption, &pi.Indexprs, &pi.Indpred)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pi, nil
  }
docs: // PgIndexByIndexrelid retrieves a row from 'pg_catalog.pg_index' as a PgIndex.
  //
  // Generated from index 'pg_index_indexrelid_index'.