public static String pg_fetch_result(Env env, @NotNull PostgresResult result, Value row, @Optional("-1") Value fieldNameOrNumber)
public static Value pg_fetch_result(Env env, @NotNull PostgresResult result, Value row, @Optional("-1") Value fieldNameOrNumber)
  public static String pg_fetch_result(Env env,                                       @NotNull PostgresResult result,                                       Value row,                                       @Optional("-1") Value fieldNameOrNumber)  {    try {      // NOTE: row is of type Value because there is a case where      // row is optional. In such a case, the row value passed in      // is actually the field number or field name.      int rowNumber = -1;      // Handle the case: optional row with mandatory fieldNameOrNumber.      if (fieldNameOrNumber.isLongConvertible() &&          (fieldNameOrNumber.toInt() < 0)) {        fieldNameOrNumber = row;        rowNumber = -1;      } else {        rowNumber = row.toInt();      }      if (rowNumber >= 0) {        result.seek(env, rowNumber);      }      Value fetchRow = result.fetchRow(env);      int fieldNumber = result.getColumnNumber(fieldNameOrNumber, 0);      return fetchRow.get(LongValue.create(fieldNumber)).toString();    } catch (Exception ex) {      log.log(Level.FINE, ex.toString(), ex);      return null;    }  }