A user-defined function (UDF) is used to perform tasks that Firebird/InterBase can’t.
It can be described as an external database function written entirely in another language, such as C++ or Pascal, to perform data manipulation tasks not directly supported by InterBase/Firebird.
UDFs can be called from InterBase/Firebird and executed on the server. These functions can exist on their own or be collected into libraries. UDFs offer the possibility to create your own functions (such as SUBSTR) and integrate them in the database itself. Each UDF is arranged as a function, belonging to a DLL (Linux: .SO). Thus one dynamically loaded library consists of at least one function.
UDFs can be incorporated into the database using the IBExpert DB Explorer, IBExpert SQL Editor, or IBExpert Script Executive.
UDFs give developers a means of extending InterBase’s analytical capabilities. They are reusable code, accessed from the server, and ensure data reliability and integrity. UDFs can process data themselves or call external services. InterBase provides a default library of User Defined Functions that offers commonly used functions. This library includes:
* Maths and trigonometry Functions, including cos, sin, base, log, and more.
* String functions: difference, insert, substring, and more.