SQL標準規格で規定されている情報スキーマ。それぞれのDBソフトウェアと互換性がある。http://www.postgresql.jp/document/9.1/html/informa.... pg_catalogのほうがよくみると思う
有効なユーザ(ロール)一覧
select * from information_schema.enabled_roles ; role_name ----------- kurt postgres repuser
schema一覧
-[ RECORD 4 ]-----------------+------------------- catalog_name | postgres schema_name | pg_catalog schema_owner | postgres default_character_set_catalog | default_character_set_schema | default_character_set_name | sql_path | -[ RECORD 5 ]-----------------+------------------- catalog_name | postgres schema_name | public schema_owner | postgres default_character_set_catalog | default_character_set_schema | default_character_set_name | sql_path | -[ RECORD 6 ]-----------------+------------------- catalog_name | postgres schema_name | information_schema schema_owner | postgres default_character_set_catalog | default_character_set_schema | default_character_set_name | sql_path |
現在接続中DBとpg_catalogのtable一覧。テーブルのオーナーまではわからない?
-- table_schemaはpublicで検索するとよい select * from information_schema.tables where table_schema = 'public'; -[ RECORD 1 ]----------------+----------- table_catalog | kurt table_schema | public table_name | t1 table_type | BASE TABLE self_referencing_column_name | reference_generation | user_defined_type_catalog | user_defined_type_schema | user_defined_type_name | is_insertable_into | YES is_typed | NO commit_action |
標準SQLで定義された機能がPostgreSQLでサポートされているかどうか。feature_nameとis_supportedをみればだいたいわかる
-[ RECORD 1 ]----+------------------------------------------------------------------------------------------------------------------------- feature_id | B011 feature_name | Embedded Ada sub_feature_id | sub_feature_name | is_supported | NO is_verified_by | comments | -[ RECORD 2 ]----+------------------------------------------------------------------------------------------------------------------------- feature_id | B012 feature_name | Embedded C sub_feature_id | sub_feature_name | is_supported | YES is_verified_by | comments |
タグ
最新コメント