From 7c04f9820fd5fbab41369f8ee13bda8d4e90432f Mon Sep 17 00:00:00 2001 From: Praneeth <59659961+ExpressGradient@users.noreply.github.com> Date: Sat, 20 Nov 2021 16:41:28 +0530 Subject: [PATCH] change return to returns in line 124 (#3954) in line 124, `return void` is wrong. the correct syntax would be `returns`. --- web/docs/guides/database/functions.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/guides/database/functions.mdx b/web/docs/guides/database/functions.mdx index 1bc97a80af9..e84afc13fd7 100644 --- a/web/docs/guides/database/functions.mdx +++ b/web/docs/guides/database/functions.mdx @@ -121,7 +121,7 @@ $$; --6 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 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`. +2. `returns text`: The type of data that the function returns. If it returns nothing, you can `returns 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.