Do I understand correctly that you cannot roll back sequences?
JDBC example:
connect();
db.setAutoCommit(false);
Statement stmt=db.createStatement();
stmt.executeQuery("select nextval('test_seq')");
... other table updates ...
stmt.close();
db.rollback();
db.close();
In this example, the sequence does not roll back. .. other table updates
... do roll back.