InformixDialect extands default substring function
registerFunction( "substring", new SQLFunctionTemplate( StandardBasicTypes.STRING, "substring(?1, ?2, ?3)" ) );
According documentation informix has 2 types of substring functions: substring(https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1560.htm?view=embed) and substr(https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1561.htm?view=embed)
The syntax differs between these 2 functions. Substring function:
|--SUBSTRING--(--source_string--FROM--start_position--+-------------+--)--| '-FOR--length-'
Example:
SELECT SUBSTRING('ABCDEFG' FROM 3 FOR 2) FROM mytable;
Substr Function:
|--SUBSTR--(--source_string--,--start_position--+-----------+--)--| '-,--length-'
SELECT SUBSTR('ABCDEFG', 0, 1) FROM mytable;
The syntax of default Hibernate's substring function equals to substr, so I think it should be used in dialect.