Firebird Functions and data type