PostgreSQL viewer: list databases and inspect records

By Anil Gautam · September 20, 2026

Can’t find a table in your PostgreSQL viewer? Check which database is open, then check the schema. A connection works inside one database at a time, and the table you need may be somewhere else.

Confirm your connection

SELECT current_database(), current_user, current_schema();

Include the returned database and role in your error report. Leave out passwords and private row data. A connection labelled “production” is only useful if its actual endpoint and database match that label.

See database names

SELECT datname
FROM pg_database
WHERE datallowconn
ORDER BY datname;

This lists catalog entries that allow connections in principle. It does not guarantee that your role has CONNECT permission or that your network can reach every target. PostgreSQL documents the fields in pg_database.

To inspect another database, establish a connection to it. PostgreSQL does not use MySQL’s USE statement to switch databases inside a SQL session. In psql, the connection command is a shell-specific command, not ordinary SQL for every GUI.

Find tables within a schema

SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;

Use your actual schema name. The table-listing guide covers columns and missing objects in more detail. Distinguish base tables from views when you need to understand where data originates.

Read one known record

Use the inspected column names to query a small sample, with a stable order and a limit. Compare an ID with an application screen or test fixture. If results differ between tools, compare role, transaction state, filters and connection context.

Choose a viewer for the repeated task

plainDB supports PostgreSQL on Mac and Windows. Check its platform differences if you need visual EXPLAIN or schema tools. PgAdmin is another option for PostgreSQL-focused administration, while a multi-engine client can help when the same workflow spans several engines.

Next: connection setup, read-only permissions, or connecting with pgAdmin.