List tables in a PostgreSQL schema

前端 未结 4 1347
攒了一身酷
攒了一身酷 2020-12-12 08:40

When I do a \\dt in psql I only get a listing of tables in the current schema (public by default).

How can I get a list of all tables in al

4条回答
  •  盖世英雄少女心
    2020-12-12 09:06

    You can select the tables from information_schema

    SELECT * FROM information_schema.tables 
    WHERE table_schema = 'public'
    

提交回复
热议问题