List tables in a PostgreSQL schema

前端 未结 4 1341
攒了一身酷
攒了一身酷 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:22

    Alternatively to information_schema it is possible to use pg_tables:

    select * from pg_tables where schemaname='public';
    

提交回复
热议问题