#navi(../../)
* PL/pgSQLが使用可能かどうか確認する [#i6adbcc8]
PL/pgSQLが使用可能かどうか確認する手順を以下に記します。
#contents
* インストールされている言語を確認する [#sbcb3e3d]
[[pg_language>https://www.postgresql.jp/document/9.4/html/catalog-pg-language.html]]カタログを調べることにより、インストールされている言語一覧を表示することができます。~
以下のSQLによりpg_languageカタログを確認します。
select * from pg_language;
* select * from pg_language 実行例 [#r8f6ea49]
以下に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が使用可能かどうかを確認する方法でした。
//#htmlinsert(db_ads_btm.html)