Psql list all tables

后端 未结 6 1552
一个人的身影
一个人的身影 2020-12-22 17:17

I would like to list all tables in the liferay database in my PostgreSQL install. How do I do that?

I would like to execute SELECT * FROM applicat

6条回答
  •  暖寄归人
    2020-12-22 17:37

    This can be used in automation scripts if you don't need all tables in all schemas:

      for table in $(psql -qAntc '\dt' | cut -d\| -f2); do
          ...
      done
    

提交回复
热议问题