CREATE FUNCTION
Parameters
This statement creates a custom function. Executing this command requires that the user have privileges.
If the function_name
contains the database name, the custom function will be created in the corresponding database, otherwise the function will be created in the database where the current session is located. The name and parameters of the new function cannot be the same as functions already existing in the current namespace, otherwise the creation will fail. But only with the same name and different parameters can the creation be successful.
Create a custom scalar function with prepare/close functions
Create a custom aggregation function