if (row == NullValue.NULL) { if (result.getPassedNullRow()) { result.setPassedNullRow(); } else {  ResultSet rs = result.getResultSet(); rs.previous(); } }
  public static ArrayValue pg_fetch_array(Env env,                                          @NotNull PostgresResult result,                                          @Optional("-1") Value row,                                          @Optional("PGSQL_BOTH") int resultType)  {    try {      // NOTE: row is of type Value because row is optional and there is      // only one way to specify that 'row' will not be used:      //      // pg_fetch_array(result, NULL, resultType)      //      // The resultType will be used above though.      //      // For such a case, the marshalling code passes row in as NullValue.NULL      // If we used 'int row' there would be no way to distinguish row 'zero'      // from row 'null'.      if (result == null)        return  null;      if (row.isLongConvertible() && row.toInt() >= 0) {        if (!result.seek(env, row.toInt())) {          env.warning(L.l("Unable to jump to row {0} on PostgreSQL result",                          row.toInt()));          return null;        }      }      return result.fetchArray(env, resultType);    } catch (Exception ex) {      log.log(Level.FINE, ex.toString(), ex);      return null;    }  }