PostgreSQL/PL/pgSQLが使用可能かどうか調べる方法
の編集
Top
/
PostgreSQL
/
PL
/
pgSQLが使用可能かどうか調べる方法
[
トップ
] [
編集
|
差分
|
バックアップ
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
PostgreSQL/template0とtemplate1の違いについて
#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が使用可能かどうかを確認する方法でした。 #htmlinsertpcsp(db-btm.html,db-sp.html)
タイムスタンプを変更しない
#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が使用可能かどうかを確認する方法でした。 #htmlinsertpcsp(db-btm.html,db-sp.html)
テキスト整形のルールを表示する