PL/pgSQLが使用可能かどうか確認する手順を以下に記します。
pg_languageカタログを調べることにより、インストールされている言語一覧を表示することができます。
以下のSQLによりpg_languageカタログを確認します。
select * from pg_language;
以下にPostgreSQLに接続し、pg_languageをselectした時の出力です。
$ psql -U postgres -h localhost postgres Password for user postgres: psql (9.5.4, server 9.2.17) Type "help" for help. postgres=# select * from pg_language; lanname | lanowner | lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl ----------+----------+---------+--------------+---------------+-----------+--------------+-------- internal | 10 | f | f | 0 | 0 | 2246 | c | 10 | f | f | 0 | 0 | 2247 | sql | 10 | f | t | 0 | 0 | 2248 | plpgsql | 10 | t | t | 11728 | 11729 | 11730 | (4 rows)
plpgsqlがあるのが確認できますので、使用可能であることがわかります。
以上、PL/pgSQLが使用可能かどうかを確認する方法でした。