The st_setsrid is missing in Postgis dialect. Is there a reason for this or would a dialect extension PR be appreciated? I haven't migrated to 5x yet, so I would like to patch it for 4x as well, would that be possible? (It affects both versions).
Extend the Postgis dialect with your own version, and add
this.registerFunction("setsrid", new StandardSQLFunction("st_setsrid", GeometryType.INSTANCE));
(For 5x the syntax seems slightly different)