Subject Re: [firebird-support] PL/SQL vs nonexistent UDF
Author Josef Kokeš
>> Is it possible do declare a stored procedure which would use a
>> non-existent external function? That is, I can define an external
>> function using:
>>
>> declare external function test
>> returns integer
>> entry_point 'TEST' module_name 'pepak.dll'
>>
>> This will succeed even if pepak.dll does not exist or does not export
>> function TEST. That's OK as long as I do not attempt to call that function.
>>
>> Now I would like to create a stored procedure which would use that function:
>>
>> create procedure test
>> returns ( a integer )
>> as
>> begin
>> a = test();
>> suspend;
>> end
>>
>> But at this moment Firebird WILL check whether the function test exists
>> in pepak.dll and return an error if it does not. Is there some way to
>> suppress this error and create the procedure? I do not intend to use the
>> procedure until the application makes sure a required version of
>> pepak.dll is being used.
>
> There is no way to do that, AFAIK.
>
> You could reference another existing UDF with the same interface or have
> some kind of stub UDF with at least the proper function exports.

Thanks. For now I am using EXECUTE STATEMENT to overcome the problem. It
works fine in my particular case, though if there was a solution which
didn't require EXECUTE STATEMENT, I would happily switch to it.

Pepak