我想在我的PostgreSQL安裝中列出liferay
數據庫中的所有表格。我怎麼做?Psql列出所有表格
我想在liferay
數據庫中執行SELECT * FROM applications;
。 applications
是我liferay分貝中的表格。這是如何完成的?
這裏是我的所有數據庫的列表:
postgres=# \list
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
liferay | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =Tc/postgres +
| | | | | postgres=CTc/postgres+
| | | | | liferay=CTc/postgres
lportal | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(5 rows)
postgres=#
哇!非常感謝你的順便說一句。這非常有價值。 –
'information_schema.tables'包含某些原因的視圖。 (無論如何,在PostgreSQL 9.2中。) – jpmc26
@ jpmc26是的,'table_type ='VIEW'',所以它們很容易排除。一般來說,SQL儘可能地嘗試將表視爲與表相同。 –