Search⌘ K
AI Features

List of PostgreSQL Commands

Learn to navigate PostgreSQL database management by exploring a comprehensive list of essential commands. Understand variations by version and discover how GUI tools simplify command execution for effective data handling and administration.

We'll cover the following...

List of PostgreSQL Commands

Commands

Description

\l or \list

Lists all databases and their corresponding owners

\c or \connect

Connects to a specific database

\dn

Lists all schemas

\dt

Lists all tables in the current database

\df

Lists all available functions in the current database

\d <table_name>

Describes the table, including its columns and their data types

\dv

Lists all the views in the current database

\du or \dus

Lists all the roles or users in the current database

\dy

Lists all event triggers in the current database

\dx

Lists all the installed extensions

\copy

Copies the data between a file and a table

\i <file_name>

Executes commands from a file with the specified file name

\q

Quits the pgsql interface

Note: These commands may ...