The routine signature
When a user or another routine invokes a routine, the database
server searches for a routine signature that matches the routine name
and arguments. If no exact match exists, the database server searches
for a substitute routine, as follows:
- When several arguments are passed to a routine, the database server
searches the sysprocedures system catalog table for a routine
whose signature is an exact match for the invoked routine:
- The database server checks for a candidate routine that has the
same data type as the leftmost argument.
For more information, see Candidate list of routines.
- If no exact match exists for the first argument, the database
server searches the candidate list of routines using a precedence
order of data types.
For more information, see Precedence list of data types.
- The database server checks for a candidate routine that has the
same data type as the leftmost argument.
- The database server continues matching the arguments from left to right. If the database contains a routine with a matching signature, the database server executes this routine.
Important: If one of the arguments for the routine
is null, more than one routine might match the routine signature.
If that situation occurs, the database server generates an error.
For more information, see Null arguments in overloaded routines.