Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

better readability for functions explanation (#3741)

Coppled86f439d117f
diff --git a/web/docs/guides/database/functions.mdx b/web/docs/guides/database/functions.mdx
index 2cb4ff1f1ef..bb9a80e391b 100644
--- a/web/docs/guides/database/functions.mdx
+++ b/web/docs/guides/database/functions.mdx
@@ -115,26 +115,17 @@ $$; --6
```
-#### Details
-
<details>
-<summary>Show/Hide</summary>
+<summary>Show/Hide Details</summary>
At it's most basic a function has the following parts:
-1. `create or replace function hello_world()`
-- The function declaration, where `hello_world` is the name of the function.
-- You can use either `create` when creating a new fucntion or `replace` when replacing an existing function. Or you can use `create or replace` together to handle either.
-2. `returns text`
-- The type of data that the function returns. If it returns nothing, you can `return void`.
-3. `language sql`
-- The language used inside the function body. This can also be a procedural language: `plpgsql`, `plv8`, `plpython`, etc.
-4. `as $$`
-- The function wrapper. Anything enclosed inside the `$$` symbols will be part of the function body.
-5. `select 'hello world';`
-- A simple function body. The final `select` statement inside a function body will be returned if there are no statements following it.
-6. `$$;`
-- The closing symbols of the funciton wrapper.
+1. `create or replace function hello_world()`: The function declaration, where `hello_world` is the name of the function. You can use either `create` when creating a new function or `replace` when replacing an existing function. Or you can use `create or replace` together to handle either.
+2. `returns text`: The type of data that the function returns. If it returns nothing, you can `return void`.
+3. `language sql`: The language used inside the function body. This can also be a procedural language: `plpgsql`, `plv8`, `plpython`, etc.
+4. `as $$`: The function wrapper. Anything enclosed inside the `$$` symbols will be part of the function body.
+5. `select 'hello world';`: A simple function body. The final `select` statement inside a function body will be returned if there are no statements following it.
+6. `$$;`: The closing symbols of the funciton wrapper.
</details>
@@ -309,4 +300,4 @@ Reference: [rpc()](/docs/reference/dart/rpc)
## Resources
- PostgreSQL Official Docs: [Chapter 9. Functions and Operators](https://www.postgresql.org/docs/current/functions.html)
-- PostgreSQL Reference: [CREATE FUNCTION](https://www.postgresql.org/docs/9.1/sql-createfunction.html)
\ No newline at end of file
+- PostgreSQL Reference: [CREATE FUNCTION](https://www.postgresql.org/docs/9.1/sql-createfunction.html)