W3cubDocs

/MariaDB

User-Defined Functions

A user-defined function (UDF) is a way to extend MariaDB with a new function that works like a native (built-in) MariaDB function such as ABS( ) or CONCAT( ).

Statements making use of user-defined functions are not safe for replication.

For an example, see sql/udf_example.cc in the source tree. For a collection of existing UDFs go to the UDF Repository on GitHub.

There are alternative ways to add a new function: writing a native function, which requires modifying and compiling the server source code; or writing a stored function.

Title Description
Creating User-Defined Functions How to create user-defined functions in C/C++.
User-Defined Functions Calling Sequences Declaring the functions required in a user-defined function.
User-Defined Functions Security MariaDB imposes a number of limitations on user-defined functions for security purposes.
CREATE FUNCTION UDF Create a user-defined function.
DROP FUNCTION UDF Drop a user-defined function.
mysql.func Table User-defined function information
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/user-defined-functions/