DbSchema Database Designer

DbSchema | How to Show Tables in PostgreSQL

In this article, you are going to see how simple it is to show all tables from PostgreSQL.

1.Using psql

In this article, we will go over 3 ways to list tables from a PostgreSQL database:

1.List tables from a specific database

To list all available databases from PostgreSQL, execute the next command:

\l

Then, select the database:

 \c database_name

To list all the tables execute:

 \dt

 

2.List tables from all schemas

To show tables from all available schemas, execute the next command:

\dt *.*

3.List tables from a specific schema

To show only tables from a specific schema, execute:

\dt schema_name.*

DbSchema Database Designer

2.Using SQL Query

To show all tables:

SELECT * FROM pg_catalog.pg_tables;

To show only tables from a specific schema, use WHERE function as it follows:

SELECT * FROM pg_catalog.pg_tables WHERE schemaname='schema_name'

Replace ‘schema_name’ with the name of the schema you want.

DbSchema Features

DbSchema → Your Trusted Partner in Database Design

Simplify complex database workflows and improve productivity with DbSchema's advanced design and management tools

Visual Design & Modeling
Visual Design & Schema Layout

➤ Create and manage your database schema visually through a user-friendly graphical interface.

➤ Easily arrange tables, columns, and foreign keys to simplify complex database structures, ensuring clarity and accessibility.

GIT & Collaboration
Version Control & Collaboration

➤ Manage schema changes through version control with built-in Git integration, ensuring every update is tracked and backed up.

➤ Collaborate efficiently with your team to maintain data integrity and streamline your workflow for accurate, consistent results.

Data Explorer & Query Builder
Relational Data & Query Builder

➤ Seamlessly navigate and visually explore your database, inspecting tables and their relationships.

➤ Build complex SQL queries using an intuitive drag-and-drop interface, providing instant results for quick, actionable insights.

Interactive Documentation & Reporting
HTML5 Documentation & Reporting

➤ Generate HTML5 documentation that provides an interactive view of your database schema.

➤ Include comments for columns, use tags for better organization, and create visually reports.