I am trying to use HSQL for testing. In production, the code runs against a DB2 database. I would like to turn on the DB2 syntax of HSQL and run the production SQL against it (or as much of it as possible).

According to the documentation, in DB2 syntax mode, the nextval for expression is supported.

I've turned on DB2 syntax mode both with the connection property, sql.syntax_db2=true, and with:

set database sql syntax db2 true;

However, I am not able to use nextval for, though the syntax next value for works correctly:

values (next value for test_seq); -- returns the next value
values (nextval for test_seq); -- results in an error