Subject Firebird beeing inconsistent in regards to accepting UDFs?
Author
Hello.
I can declare UDF even if there is no dll in the required Firebird folder. I conisder it as a nice feature, it is like a late-binding in programming.

For example:

DECLARE EXTERNAL FUNCTION TEST_1
CSTRING(256), BLOB
RETURNS PARAMETER 2
ENTRY_POINT 'TestFunctions'
MODULE_NAME 'UDF';

I can compile this code and commit it without any problems because Firebird does not check if the UDF.dll exists physically on the given location.

So I have my function TEST_1 and of course I get error when I try to use it when dll is not present.

Now, I would like to define stored procedure which will be using my function:

SET TERM ^ ;
CREATE PROCEDURE TEST_UDF_1
RETURNS (TMP VARCHAR(200))
AS
BEGIN
  SELECT
    TEST_1('aaa') FROM RDB$DATABASE
  INTO
    :TMP;
END^
SET TERM ; ^

I can compile this procedure, but I can not commit it. I think that behaviour is inconsistent. If I can declare and commit UDF I should be also define and commit procedure which is using this UDF. After all it compiles fine...(Firebird 2.5)

What do you think?