@JRubyMethod(name = {"lo_create", "locreate"})
public IRubyObject lo_create(ThreadContext context, IRubyObject arg0) {
try {
LargeObjectAPI manager = postgresqlConnection.getLargeObjectAPI();
int oid = manager.loCreate((Integer) arg0.toJava(Integer.class));
return new RubyFixnum(context.runtime, oid);
} catch (PostgresqlException e) {
throw newPgError(context, "lo_create failed: " + e.getLocalizedMessage(), e.getResultSet(), getClientEncodingAsJavaEncoding(context));
} catch (IOException e) {
throw newPgError(context, "lo_create failed: " + e.getLocalizedMessage(), null, getClientEncodingAsJavaEncoding(context));