相关疑难解决方法(0)

PostgreSQL查询列出所有表名?

是否有任何查询可以列出我的Postgres DB中的所有表.

我尝试了一个查询,如:

SELECT table_name FROM information_schema.tables
                      WHERE table_schema='public' 
Run Code Online (Sandbox Code Playgroud)

但是这个查询也会返回视图.

我怎样才能只获取表名,而不是视图?

postgresql postgresql-9.2

160
推荐指数
7
解决办法
19万
查看次数

ps列出所有表

我想liferay在PostgreSQL安装中列出数据库中的所有表.我怎么做?

我想SELECT * FROM applications;liferay数据库中执行.applications是我liferay db中的一个表.这是怎么做到的?

这是我所有数据库的列表:

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 …
Run Code Online (Sandbox Code Playgroud)

postgresql psql

121
推荐指数
4
解决办法
21万
查看次数

标签 统计

postgresql ×2

postgresql-9.2 ×1

psql ×1