diff --git a/docs/plpgsql.md b/docs/plpgsql.md new file mode 100644 index 00000000..da190b0c --- /dev/null +++ b/docs/plpgsql.md @@ -0,0 +1,9 @@ +# PL/pgSQL Support + +Postgres Language Tools partially supports PL/pgSQL. We use `libpg_query` to parse the function body and show any syntax error. For a more sophisticated integration, make sure to enable the `plpgsql_check` extension in your development database. + +```sql +CREATE EXTENSION IF NOT EXISTS plpgsql_check; +``` + +If the extension is detected, we leverage it to run more advanced checks against your PL/pgSQL functions. diff --git a/mkdocs.yml b/mkdocs.yml index 572642c6..120be04d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,6 +16,7 @@ nav: - Introduction: index.md - Guides: - Linting Migrations: checking_migrations.md + - PL/pgSQL Support: plpgsql.md - Troubleshooting: troubleshooting.md - Reference: - Rules: rules.md