Name the routine
Choose sensible names for your routines. Make the routine name easy to remember and have it succinctly describe what the routine does. The database server supports polymorphism, which allows multiple routines to have the same name. This ability to assign one name to multiple routines is called routine overloading. For more information about routine overloading, refer to Routine overloading.
Routine overloading
is contrary to programming practice in some high-level languages.
For example, a C programmer might be tempted to create functions with
the following names that return the larger of their arguments:
bigger_int(integer, integer)
bigger_real(real, real)
In SQL, these routines are
better defined in the following way:
bigger(integer, integer)
bigger(real, real)
The naming scheme in the second example allows users to ignore the types of the arguments when they call the routine. They simply remember what the routine does and let the database server choose which routine to call based on the argument types. This feature makes the UDR simpler to use.