ArrayValueImpl arr = (ArrayValueImpl)params; int sz = arr.size();  char buf[] = new char[sz]; for (int i=0; i<sz; i++) buf[i] = 's'; String types = new String(buf);  Value value[] = arr.getValueArray(env); pstmt.bindParams(env, types, value);  if (!pstmt.execute(env)) return null;  if (pstmt.getStatementType().equals("SELECT")) { PostgresResult result = new PostgresResult(null, pstmt.getResultSet(), null); conn.setResultResource(result); return result; } else {  return null;  }
return executeInternal(env, conn, pstmt, params);
  public static PostgresResult pg_execute(Env env,                                          @NotNull Postgres conn,                                          String stmtName,                                          ArrayValue params)  {    try {      PostgresStatement pstmt = conn.getStatement(stmtName);      ArrayValueImpl arr = (ArrayValueImpl)params;      int sz = arr.size();      char buf[] = new char[sz];      for (int i=0; i<sz; i++)        buf[i] = 's';      String types = new String(buf);      Value value[] = arr.getValueArray(env);      pstmt.bindParams(env, types, value);      if (!pstmt.execute(env))        return null;      if (pstmt.getStatementType().equals("SELECT")) {        PostgresResult result = new PostgresResult(null, pstmt.getResultSet(), null);        conn.setResultResource(result);        return result;      } else {        // XXX: ??? return type?        return null;        // return pstmt;      }    } catch (Exception ex) {      log.log(Level.FINE, ex.toString(), ex);      conn.setResultResource(null);      return null;    }  }