Subject Re: [firebird-support] UDF dependencies
Author Jonathan Neve
Helen Borrie wrote:

>Not exactly...but you can do this. Let's say you have the original
>definition for RTRIM, as follows:
>DECLARE EXTERNAL FUNCTION rtrim
> CSTRING(80)
> RETURNS CSTRING(80) FREE_IT
> ENTRY_POINT 'IB_UDF_rtrim' MODULE_NAME 'ib_udf';
>
>..and you want to redefine it to take and return a string of up to 200 bytes:
>
>DECLARE EXTERNAL FUNCTION rtrim1
> CSTRING(200)
> RETURNS CSTRING(200) FREE_IT
> ENTRY_POINT 'IB_UDF_rtrim' MODULE_NAME 'ib_udf';
>
>Then, in your dependent SPs or triggers, alter the definition to use rtrim1
>instead.
>
>
Not bad. But in my case, renaming the function is not an option, since I
have an application in which I backup the DB from the IB 5 db, and
restore it locally on the Windows machine, and then start trying to work
with it. Since it's all done automatically, this is not possible,
especially since an "alter procedure" statement only takes effect, I've
noticed, after all the connections to the DB have been closed... Anyway,
for now, I'll simply do a system table update (this should work reliably
shouln't it?). But I do think it's kind of a pity to have introduced
this sort of extra difficulty which didn't exist before. Redeclaring a
UDF in order to, for example, take a bigger parameter size, is a commun
occurance. I've had to do this on a production IB6.0 DB once, and I'm
glad I could simply do a "drop external function; declare external
function....".

Anyway, thanks for your help!
Jonathan Neve.