code: func PgCastByOid(db XODB, oid pgtypes.Oid) (*PgCast, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, castsource, casttarget, castfunc, castcontext, castmethod ` +
  		`FROM pg_catalog.pg_cast ` +
  		`WHERE oid = $1`
  
  	// run query
  	XOLog(sqlstr, oid)
  	pc := PgCast{}
  
  	err = db.QueryRow(sqlstr, oid).Scan(&pc.Tableoid, &pc.Cmax, &pc.Xmax, &pc.Cmin, &pc.Xmin, &pc.Oid, &pc.Ctid, &pc.Castsource, &pc.Casttarget, &pc.Castfunc, &pc.Castcontext, &pc.Castmethod)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pc, nil
  }
docs: // PgCastByOid retrieves a row from 'pg_catalog.pg_cast' as a PgCast.
  //
  // Generated from index 'pg_cast_oid_index'.