FirebirdSQL logo
 FUNCTIONPACKAGE 

ALTER EXTERNAL FUNCTION

Alters the entry point and/or the module name of a user-defined function (UDF)

Available in

DSQL

Syntax
ALTER EXTERNAL FUNCTION funcname
  [ENTRY_POINT 'new_entry_point']
  [MODULE_NAME 'new_library_name']
Table 1. ALTER EXTERNAL FUNCTION Statement Parameters
Parameter Description

funcname

Function name in the database

new_entry_point

The new exported name of the function

new_library_name

The new name of the module (MODULE_NAME from which the function is exported).This will be the name of the file, without the “.dll” or “.so” file extension.

The ALTER EXTERNAL FUNCTION statement changes the entry point and/or the module name for a user-defined function (UDF).Existing dependencies remain intact after the statement containing the change(s) is executed.

The ENTRY_POINT clause

is for specifying the new entry point (the name of the function as exported from the module).

The MODULE_NAME clause

is for specifying the new name of the module where the exported function is located.

Any user connected to the database can change the entry point and the module name.

Who Can Alter an External Function

The ALTER EXTERNAL FUNCTION statement can be executed by:

  • Administrators

  • Owner of the external function

  • Users with the ALTER ANY FUNCTION privilege

docnext count = 4

Examples using ALTER EXTERNAL FUNCTION

Changing the entry point for an external function
ALTER EXTERNAL FUNCTION invl ENTRY_POINT 'intNvl';
Changing the module name for an external function
ALTER EXTERNAL FUNCTION invl MODULE_NAME 'fbudf2';

DROP EXTERNAL FUNCTION

Drops a user-defined function (UDF) from the current database

Available in

DSQL, ESQL

Syntax
DROP EXTERNAL FUNCTION funcname
Table 1. DROP EXTERNAL FUNCTION Statement Parameter
Parameter Description

funcname

Function name in the database

The DROP EXTERNAL FUNCTION statement deletes the declaration of a user-defined function from the database.If there are any dependencies on the external function, the statement will fail and raise an error.

Any user connected to the database can delete the declaration of an internal function.

Who Can Drop an External Function

The DROP EXTERNAL FUNCTION statement can be executed by:

  • Administrators

  • Owner of the external function

  • Users with the DROP ANY FUNCTION privilege

Example using DROP EXTERNAL FUNCTION

Deleting the declaration of the addDay function.
DROP EXTERNAL FUNCTION addDay;