oids = new int[array.getLength()];
for (int i = 0; i < oids.length; i++)
oids[i] = (int) ((RubyFixnum) array.get(i)).getLongValue();
}
oids = oids == null ? new int [0] : oids;
ResultSet result = postgresqlConnection.prepare(name, query, oids);
return createResult(context, result, NULL_ARRAY, Block.NULL_BLOCK);
} catch (PostgresqlException e) {
throw newPgError(context, e.getLocalizedMessage(), e.getResultSet(), getClientEncodingAsJavaEncoding(context));
} catch (Exception e) {
throw newPgError(context, e.getLocalizedMessage(), null, getClientEncodingAsJavaEncoding(context));