# Does YugabyteDB support UDFs (user-defined functions)?

**URL:** https://forum.yugabyte.com/t/does-yugabytedb-support-udfs-user-defined-functions/608
**Category:** General
**Created:** [January 24, 2020, 1:32pm UTC](https://forum.yugabyte.com/t/does-yugabytedb-support-udfs-user-defined-functions/608 "2020-01-24T13:32:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![adam.afloat](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@adam.afloat](https://forum.yugabyte.com/u/adam.afloat)
#### Post date: [January 24, 2020, 1:32pm UTC](https://forum.yugabyte.com/t/does-yugabytedb-support-udfs-user-defined-functions/608/1 "2020-01-24T13:32:57Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)
#### Post date: [January 24, 2020, 3:51pm UTC](https://forum.yugabyte.com/t/does-yugabytedb-support-udfs-user-defined-functions/608/2 "2020-01-24T15:51:33Z")

</div>

Yes functions are available [Create function statement [YSQL] | YugabyteDB Docs](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: [Create function statement [YSQL] | YugabyteDB Docs](https://docs.yugabyte.com/latest/api/ysql/commands/ddl_create_function/#examples)
