DbSchema Database Designer

DbSchema | 10+ Essential PostgreSQL Commands



The table below contains the essential commands for PostgreSQL. These commands will help you easily manage your PostgreSQL databases.


Function Command Syntax Comments
Connect to a database under a specific user psql -d database -U user -W Replace database and user
Connect to a database on another hots psql -h host -d database -U user -W Replace the host, database and user
Switch connection \c dbname username Replace with the name of the database & the username. If the username is left empty, it will automatically connect with current user
List available databases \l
List available schemas \dn
List available tables \dt To list tables from all schemas, add *.*. To list from a specific schema, add schema_name.*(ex. \dt information_schema.*
Describe a table \d table_name
List available views \dv
List indexes \di
List data types \dT+
List users \du This command will also list the roles of the users
Access command history \s To save the command history to a file, specify the filename after the command
Get help on commands \? This will show a list with all the commands available in PostgreSQL.
Get help on a specific statement \h statement This will show you details about a specific PostgreSQL statement. (ex. \h CREATE TABLE)
Quit \q

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.