I can specify my own custom AGGREGATE functions using the syntax defined here:
http://hsqldb.org/doc/guide/sqlroutines-chapt.html#src_aggregate_functions
CREATE AGGREGATE FUNCTION ...
Unfortunately, there doesn't seem to be any flag in the INFORMATION_SCHEMA.ROUTINES table to recognise such functions - e.g. in jOOQ's code generator.
As a workaround, I can "parse" the ROUTINE_DEFINITION column for "AGGREGATE FUNCTION"
This would be a good idea. I need to figure out how to add this as the ROUTINES view is defined by the SQL Standard.
I hadn't seen any columns in the SQL standard 2011 draft document. But then again, custom aggregate functions aren't really part of the standard either, I think?