Skip to content

Commit 14ed8fd

Browse files
authored
chore: fix syntax error in job function template (#3976)
1 parent 51c8ea5 commit 14ed8fd

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Diff for: use-timescale/jobs/create-and-manage-jobs.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ To create a $JOB, create a [function][postgres-createfunction] or [procedure][po
2929
```sql
3030
CREATE FUNCTION <function_name> (required arguments)
3131
RETURNS <return_datatype> AS $<variable_name>$
32-
DECLARE
33-
<declaration>;
34-
BEGIN
35-
<function_body>;
36-
RETURN { <variable_name> | value }
37-
END; LANGUAGE <language>;
32+
DECLARE
33+
<declaration>;
34+
BEGIN
35+
<function_body>;
36+
RETURN { <variable_name> | value }
37+
END;
38+
$<variable_name>$ LANGUAGE <language>;
3839
```
3940

4041
For example, to create a function that returns the total row count of a table within a $SERVICE_SHORT:
@@ -173,4 +174,4 @@ Alter an existing $JOB with [`alter_job`][api-alter_job]. You can change both th
173174
[api-timescaledb_information-jobs]: /api/:currentVersion:/informational-views/jobs/
174175
[postgres-createfunction]: https://www.postgresql.org/docs/current/xfunc.html
175176
[postgres-createprocedure]: https://www.postgresql.org/docs/current/xproc.html
176-
[plpgsql]: https://www.postgresql.org/docs/current/plpgsql-overview.html
177+
[plpgsql]: https://www.postgresql.org/docs/current/plpgsql-overview.html

0 commit comments

Comments
 (0)