> I'm working on the migration of a FB1.5 database to FB2.1.
> In my FB1.5 database i used an udf "trim", but in fb2.1 trim is an FB internal
> function.

Note to all, for future reference, do not use UDF names which *could* conflict 
with internal functions that may be added.  For myself, to ensure maximum 
safety, I always add a "F_" prefix to UDF names.


> I want to use the internal function and remove the udf.

You would need to follow the following steps.

1- In the source database, define a new "F_Trim" UDF which uses the same entry 
point as the exists "trim" UDF.
2- In the source database, replace all "trim" references with "F_Trim" in 
procedures and triggers.  (If you extract db metadata to script/text file, you 
can perform search/replace -- just remember to also replace "CREATE PROCEDURE" 
and "CREATE TRIGGER" with "CREATE OR ALTER PROCEDURE" and "CREATE OR ALTER 
TRIGGER")
3- In the source database, drop "Trim" UDF
4- Backup source and restore to new database
5- (Optional) In the new database, replace all "F_Trim" references with "Trim" 
in procedures and triggers.


Sean

Reply via email to