Object pgconn = ((com.caucho.sql.UserConnection) userconn).getConnection();
Object pgconn = ((UserConnection) userconn).getConnection();
  public static boolean pg_lo_unlink(Env env,                                     @NotNull Postgres conn,                                     int oid)  {    try {      // LargeObjectManager lobManager;      Object lobManager;      //org.postgresql.largeobject.LargeObjectManager      Class cl = Class.forName("org.postgresql.PGConnection");      Method method = cl.getDeclaredMethod("getLargeObjectAPI", null);      Object userconn = conn.getConnection();      Object pgconn = ((com.caucho.sql.UserConnection) userconn).getConnection();      lobManager = method.invoke(pgconn, new Object[] {});      cl = Class.forName("org.postgresql.largeobject.LargeObjectManager");      method = cl.getDeclaredMethod("unlink", new Class[] {Integer.TYPE});      method.invoke(lobManager, new Object[] {oid});      return true;    } catch (Exception ex) {      log.log(Level.FINE, ex.toString(), ex);      return false;    }  }