code: func PgEnumByOid(db XODB, oid pgtypes.Oid) (*PgEnum, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, enumtypid, enumsortorder, enumlabel ` +
  		`FROM pg_catalog.pg_enum ` +
  		`WHERE oid = $1`
  
  	// run query
  	XOLog(sqlstr, oid)
  	pe := PgEnum{}
  
  	err = db.QueryRow(sqlstr, oid).Scan(&pe.Tableoid, &pe.Cmax, &pe.Xmax, &pe.Cmin, &pe.Xmin, &pe.Oid, &pe.Ctid, &pe.Enumtypid, &pe.Enumsortorder, &pe.Enumlabel)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pe, nil
  }
docs: // PgEnumByOid retrieves a row from 'pg_catalog.pg_enum' as a PgEnum.
  //
  // Generated from index 'pg_enum_oid_index'.