PostgreSQLで作成されているテーブルの一覧を取得する方法
PostgreSQL でテーブルの一覧を取得するにはシステムカタログの pg_tables を使用します。
PostgreSQLのテーブル一覧
PostgreSQL のテーブル一覧はシステムカタログの pg_tables を検索すると取得できます。
SELECT schemaname, tablename from pg_tables
実行結果(長いので一部省略)は以下になります。
| schemaname | tablename | tableowner |
|---|---|---|
| pg_catalog | pg_statistic | postgres |
| pg_catalog | pg_type | postgres |
| public | master_post | system-trust |
| public | master_user | system-trust |
| pg_catalog | pg_authid | postgres |
| pg_catalog | pg_user_mapping | postgres |
| pg_catalog | pg_attribute | postgres |
| pg_catalog | pg_proc | postgres |







