Subject | Dropping udf trim to use FB 2.1 internal function |
---|---|
Author | Marianne |
Post date | 2013-02-04T20:22:58Z |
Hello,
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.
I want to use the internal function and remove the udf.
I'm tryin to drop trim udf like this :
DROP EXTERNAL FUNCTION "TRIM"
But it does'nt work, i have 80 dependencies in procedures and 7 in triggers.
Because dropping didn't worked, i tried to change system tables :
DELETE FROM rdb$dependencies WHERE (UPPER(RDB$DEPENDED_ON_NAME) = UPPER('TRIM'));
DELETE FROM RDB$FUNCTION_ARGUMENTS WHERE RDB$FUNCTION_NAME = 'TRIM' ;
UPDATE RDB$FUNCTIONS SET RDB$FUNCTION_NAME = 'TRIM_OLD' WHERE RDB$FUNCTION_NAME = 'TRIM';
DELETE FROM RDB$FUNCTIONS WHERE RDB$FUNCTION_NAME = 'TRIM_OLD';
But when i try to do a backup/restore of my database i got this errors :
gbak: ERROR:invalid request BLR at offset 328
gbak: ERROR: function TRIM is not defined
gbak: ERROR: exiting before completion due to errors
Did i forget to change something in the system tables ?
Or is there an easier way to remove my TRIM udf to simply use the internal trim function ?
Thanks in advance,
Marianne
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.
I want to use the internal function and remove the udf.
I'm tryin to drop trim udf like this :
DROP EXTERNAL FUNCTION "TRIM"
But it does'nt work, i have 80 dependencies in procedures and 7 in triggers.
Because dropping didn't worked, i tried to change system tables :
DELETE FROM rdb$dependencies WHERE (UPPER(RDB$DEPENDED_ON_NAME) = UPPER('TRIM'));
DELETE FROM RDB$FUNCTION_ARGUMENTS WHERE RDB$FUNCTION_NAME = 'TRIM' ;
UPDATE RDB$FUNCTIONS SET RDB$FUNCTION_NAME = 'TRIM_OLD' WHERE RDB$FUNCTION_NAME = 'TRIM';
DELETE FROM RDB$FUNCTIONS WHERE RDB$FUNCTION_NAME = 'TRIM_OLD';
But when i try to do a backup/restore of my database i got this errors :
gbak: ERROR:invalid request BLR at offset 328
gbak: ERROR: function TRIM is not defined
gbak: ERROR: exiting before completion due to errors
Did i forget to change something in the system tables ?
Or is there an easier way to remove my TRIM udf to simply use the internal trim function ?
Thanks in advance,
Marianne