Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification for User-Defined actions #3775

Open
wants to merge 6 commits into
base: latest
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ the SQL procedural language [PL/pgSQL][plpgsql].
The basic syntax of a function suitable for a user-defined action is:

```sql
CREATE FUNCTION <function_name> (arguments)
CREATE FUNCTION <function_name> (required arguments)
RETURNS <return_datatype> AS $<variable_name>$
DECLARE
<declaration>;
Expand All @@ -37,10 +37,10 @@ RETURNS <return_datatype> AS $<variable_name>$
END; LANGUAGE <language>;
```

This is an example of a function returns the total row count of a table
This is an example of a function that returns the total row count of a table
within a database.

Use this code to create the function:
Use this code to create the function. Note that `job_id` and `config` are required arguments.

```sql
CREATE FUNCTION totalRecords (job_id INT DEFAULT NULL, config JSONB DEFAULT NULL)
Expand Down