CREATE FUNCTION TestFunction (Arg1 TYPE OF TestDomain) RETURNS INTEGER AS
ALTER DOMAIN TestDomain TYPE BIGINT;
Firebird engine will hang after the last commit (Firebird service must be restarted before you can continue). This also occurs for TYPE OF COLUMN. This issue only involves stored functions; for stored procedure it works okay.