https://github.com/okbob/plpgsql_check/
plpgsql_check is a PostgreSQL extension with functionality for direct or indirect extra validation of functions in PL/pgSQL language. It verifies a validity of SQL identifiers used in PL/pgSQL code. It also tries to identify performance issues.
The PostgreSQL RPM repository uses PostgreSQL version numbers in the RPM packages. For example plpgsql_check for PostgreSQL 18 is named as plpgsql_check_18. Similarly plpgsql_check for PostgreSQL 17 is named as plpgsql_check_17.
plpgsql_check provides the following subpackages:
Install PGDG repository from: https://zypp.postgresql.org/repopackages/
| OS | Command |
|---|---|
| SuSE Enterprise Linux 15 / 16, OpenSuSE Leap 16.0 | zypper install plpgsql_check_18 (or change the version as described above) |
plpgsql_check has two modes:
shared_preload_libraries="plpgsql_check"
Alternatively you can load the extension in individual session(s) by:
You can use the following GUC to manage this extension. Please refer to the extension documentation for details:
plpgsql_check.mode # (enum) Default mode is
by_function, that means that the enhanced check is done only
in active mode - by calling the plpgsql_check_function.
fresh_start means cold start (first the function is called).
Possible values: disabled, by_function, fresh_start, every_start plpgsql_check.fatal_errors # (boolean) Default: onplpgsql_check.show_nonperformance_extra_warnings # (boolean) Default: offplpgsql_check.show_nonperformance_warnings # (boolean) Default: offplpgsql_check.show_performance_warnings # (boolean) Default: off
Connect to the database that you want to create the extension as superuser and run:
CREATE EXTENSION plpgsql_check;
| PostgreSQL version(s) | OS version | Arch | Status |
|---|---|---|---|
| 18,17,16,15,14 | SuSE Enterprise Linux 16 | x86_64 | Available |
| 18,17,16,15,14 | OpenSuSE Leap 16.0 | x86_64 | Available |
| 18,17,16,15,14 | SuSE Enterprise Linux 15 | x86_64 | Available |