Please note the following commands:

  • \list or \l: list all databases
  • \c <db name>: connect to a certain database
  • \dt: list all tables in the current database using your search_path
  • \dt *.: list all tables in the current database regardless your search_path

You will never see tables in other databases, these tables aren't visible. You have to connect to the correct database to see its tables (and other objects).

To switch databases:

\connect database_name or \c database_name

See the manual about psql.

Answer from Frank Heikens on Stack Exchange
🌐
CommandPrompt Inc.
commandprompt.com › education › show-databases-postgresql
How to Show Databases in PostgreSQL — CommandPrompt Inc.
May 5, 2024 - Use the “\l” or “\l+” commands ... show the list of databases using pgAdmin, click on the “Servers”, expand the “Databases” Tree, and then click on the “properties” tab....
Address   2950 Newmarket ST STE 101 - 231, 98226, Bellingham
Discussions

database - How to show tables in PostgreSQL? - Stack Overflow
If you are using pgAdmin4 in PostgreSQL, you can use this to show the tables in your database: More on stackoverflow.com
🌐 stackoverflow.com
postgresql - How to list databases in terminal in PostgresSQL? - Stack Overflow
I'm experienced with MySQL, but I've just started to work with Postgres - from the terminal, how can I see the list of existing Postgres databases using the psql command? I checked the documentatio... More on stackoverflow.com
🌐 stackoverflow.com
postgresql - Databases in psql Don't Show up in PgAdmin4 - Stack Overflow
I create a database and logged in by the master password but I don't find the database even the + mark is not shown in the servers. can anyone help, please? ... Unlike in pgAdmin3, with pgAdmin4, here you have to manually connect to a running postgres server and you already have your specific ... More on stackoverflow.com
🌐 stackoverflow.com
New database on PostgreSQL server not showing up after CREATE database [database];
What if you edit the connection and click show all databases? More on reddit.com
🌐 r/dbeaver
2
3
July 17, 2023
🌐
DB Vis
dbvis.com › thetable › postgres-list-databases
How To List Databases in PostgreSQL: A Complete Guide
February 5, 2025 - You can list databases in PostgreSQL ... Execute SELECT datname FROM pg_database;. GUI tools: Use database clients like DbVisualizer or pgAdmin to view databases visually....
🌐
PhoenixNAP
phoenixnap.com › home › kb › databases › how to list all databases in postgresql
How to List All Databases in PostgreSQL {3 Methods}
November 23, 2023 - Follow these steps to see all databases on the server using pgAdmin: 1. Open pgAdmin and enter your password to connect to the database server. 2. Expand the Servers section in the menu on the left side of the screen.
🌐
Leapcell
leapcell.io › blog › how-to-show-databases-in-postgre-sql
How to Show Databases in PostgreSQL | Leapcell
July 25, 2025 - Open pgAdmin and connect to your PostgreSQL server. In the left-hand tree, expand the "Servers" node. Under your server, expand the "Databases" node to see all available databases.
🌐
GeeksforGeeks
geeksforgeeks.org › postgresql › postgresql-show-databases
PostgreSQL - Show Databases - GeeksforGeeks
2 weeks ago - To list all databases present on the current PostgreSQL server, use one of the following pSQL meta-commands.
🌐
Medium
medium.com › the-table-sql-and-devtalk › three-easy-ways-to-list-databases-in-postgresql-07d51775d8ae
Three Easy Ways to List Databases in PostgreSQL | The Table — Databases and SQL
June 13, 2024 - Open pgAdmin, connect to your server, and expand the “Databases” group to see the list. Listing databases in PostgreSQL can be done via command-line, SQL queries, or database clients. Each method has its advantages depending on your needs.
Find elsewhere
🌐
VSYS
vsys.host › how-to › how-to-list-all-databases-in-postgresql
How to List All Databases in PostgreSQL ★ VSYS Tutorials
August 8, 2024 - The SELECT statement retrieves a list of databases by querying the database names from the pg_database catalog. Database clients like pgAdmin and DBeaver offer a user-friendly interface to easily view and edit databases.
🌐
Datensen
datensen.com › home › blog › postgresql › how to list databases and tables in postgresql
How to List Databases and Tables in PostgreSQL
June 18, 2025 - In this article, we will explore a few methods to list all databases in PostgreSQL and show all tables from a selected database.
🌐
StrongDM
strongdm.com › blog › security
How to List All Databases in PostgreSQL (psql and More)
June 25, 2025 - This method leverages the "\l" meta-command. Launch the PostgreSQL application and connect using the following command: "psql -U your_username." By default, this connects to the "postgres" database.
🌐
Dataedo
dataedo.com › kb › query › postgresql › list-databases
List databases on PostgreSQL instance - PostgreSQL Data Dictionary Queries
November 7, 2018 - database_id - databalase id, unique within an instance of PostgreSQL ... View of databases in pgAdmin. Blue rectangle shows databases.
🌐
Atlassian
atlassian.com › data › admin › how to list databases and tables in postgresql using psql
How to List databases and tables in PostgreSQL using psql
When it comes to administering Postgres databases, there’s a wide variety of third party tools available such as SQL Workbench/J or pgAdmin III. However, Postgres itself comes bundled with a powerful command line tool called psql which is great for those familiar with the terminal or looking ...
🌐
StrongDM
strongdm.com › blog › security
How to Show/List Tables in PostgreSQL (psql, SQL & pgAdmin)
October 24, 2025 - Launch pgAdmin and connect to your PostgreSQL server. Expand the Servers dropdown menu on the left, then Databases, and select the one you want.
🌐
Medium
medium.com › @ajaymaurya73130 › mastering-postgresql-5-ways-to-list-all-databases-cli-sql-gui-compared-a1d760d12207
Mastering PostgreSQL: 5 Ways to List All Databases (CLI, SQL & GUI Compared) | by Ajaymaurya | Medium
June 7, 2025 - In this article, we’ll walk through five practical ways to list all PostgreSQL databases, comparing command-line methods (psql), SQL queries, and GUI interfaces. Whether you’re managing cloud-hosted PostgreSQL or running it locally, you’ll find the right method for your workflow. How to list databases using psql commands · SQL queries to get database names · GUI options like pgAdmin and DbVisualizer ·
🌐
Neon
neon.com › postgresql › postgresql-administration › postgresql-show-databases
PostgreSQL Show Databases
This statement uses the postgres user to connect to the local PostgreSQL server. It’ll prompt you to enter a password. Second, show all the databases in the current server using the \l command:
Top answer
1 of 3
29

Unlike in pgAdmin3, with pgAdmin4,
here you have to manually connect to a running postgres server and
you already have your specific database (DB) created.

So to set the stage, make sure you have the postgres server is running, and that you have created that DB already too.

Notice (in the image) that I CREATE database XYZ and GRANT all privileges to default user postgres. (Note; to work properly with pgAdmin4, you have to create a user called postgres in order to be able to connect with and log in to pgAdmin4.)

Then here are some quick steps to follow:

  1. When within pgAdmin4, right-click the Servers option and select create.

Note:

  • In the image you'll see (1) next to "Servers" because I have done this process already. Kindly ignore that).
  • Select "server group" if you have many servers that you want to better manage. For most basic use cases, go ahead and select "server" (like I did).


  1. For either option you select above, you'll get a pop-box to complete the "connection process". I selected "server" which is appropriate for your use case (see image below).

Note:

  • "name" field is required
  • As you can see already, enter a name (I went with "postgres" since it's what I was used to by default in pgAdmin3, but you can enter any name).
  • Notice the "connect now" checkbox is checked by default so as soon as the process is successful, your DB should display in the sidemenu. (This is a key to confirm that you entered the right info). But you can always uncheck this, to connect later.


  1. Now, click connection tab and you see the image below.
    The key fields to fill here, to keep it simple, are host name/address and password. Remember to save after entering your info.

Note:

  • If on connecting to local machine, localhost or http://127.0.0.1 should do. (I did "localhost")
  • If connecting to a DB instance in the cloud e.g. AWS, enter the endpoint in the host space.
    Here's more from AWS
  • A lot of the other fields have the default settings used when installing postgres and pgAdmin.


If you followed the steps above properly, then you should see something like this after you save.


Here's a good guide from the pgAdmin documentation

2 of 3
5

In case you created your database as template CREATE DATABASE ... IS_TEMPLATE =true, then the database is considered as "system object" and is not shown in the list if PgAdmin4 option "Show system objects?" is set to false.

Try menu File -> Preferences, in the tree find Browser -> Display, and the option is at the bottom.

Another possible way is to remove the template option:

ALTER DATABASE xxx IS_TEMPLATE = false

and then you will see your database without changing PgAdmin preferences.

🌐
Devart
devart.com › dbforge › postgresql › studio › how-to-list-all-databases-in-postgresql.html
How to List all Databases in PostgreSQL [Explained]
On executing either \l or \list, you will get a list of all available databases in the PostgreSQL server, along with their names, owners, corresponding encodings, collation order, character classification, and permissions.
🌐
CommandPrompt Inc.
commandprompt.com › education › postgresql-list-users-databases-schemas-tables
PostgreSQL List Users, Databases, Schemas, Tables — CommandPrompt Inc.
May 5, 2024 - In Postgres, the “\dn”, “\dn+” commands, and “information_schema” are used to get the list of available schemas. The “\dn” and “\dn+” commands must be executed from the SQL Shell; however, getting the list of available schemas ...
Address   2950 Newmarket ST STE 101 - 231, 98226, Bellingham