code: func PgRangeByRngtypid(db XODB, rngtypid pgtypes.Oid) (*PgRange, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, ctid, rngtypid, rngsubtype, rngcollation, rngsubopc, rngcanonical, rngsubdiff ` +
  		`FROM pg_catalog.pg_range ` +
  		`WHERE rngtypid = $1`
  
  	// run query
  	XOLog(sqlstr, rngtypid)
  	pr := PgRange{}
  
  	err = db.QueryRow(sqlstr, rngtypid).Scan(&pr.Tableoid, &pr.Cmax, &pr.Xmax, &pr.Cmin, &pr.Xmin, &pr.Ctid, &pr.Rngtypid, &pr.Rngsubtype, &pr.Rngcollation, &pr.Rngsubopc, &pr.Rngcanonical, &pr.Rngsubdiff)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pr, nil
  }
docs: // PgRangeByRngtypid retrieves a row from 'pg_catalog.pg_range' as a PgRange.
  //
  // Generated from index 'pg_range_rngtypid_index'.