Add a specific name

Because HCL OneDB™ supports routine overloading, an SPL routine might not be uniquely identified by its name alone. However, a routine can be uniquely identified by a specific name. A specific name is a unique identifier that you define in the CREATE PROCEDURE or CREATE FUNCTION statement, in addition to the routine name. A specific name is defined with the SPECIFIC keyword and is unique in the database. Two routines in the same database cannot have the same specific name, even if they have different owners.

A specific name can be up to 128 bytes long. The following figure shows how to define the specific name calc1 in a CREATE FUNCTION statement that creates the calculate() function.
Figure 1: Define the specific name.
CREATE FUNCTION calculate(a INT, b INT, c INT)
   RETURNING INT
   SPECIFIC calc1;
. . .
END FUNCTION;

Because the owner bsmith has given the SPL function the specific name calc1, no other user can define a routine—SPL or external—with the specific name calc1. Now you can refer to the routine as bsmith.calculate or with the SPECIFIC keyword calc1 in any statement that requires the SPECIFIC keyword.