Does YugabyteDB support UDFs (user-defined functions)?

Are postgres UDFs supported in YugabyteDB YSQL, and can these functions be called from the context of SQL statements?

Yes functions are available https://docs.yugabyte.com/latest/api/ysql/commands/ddl_create_function/ and can be called in sql statements.

We build on top of Postgresql codebase so most functionality is already supported.

See examples for sql and pl/pgsql functions: https://docs.yugabyte.com/latest/api/ysql/commands/ddl_create_function/#examples

1 Like