A table you created does not appear in the pgAdmin 4 browser tree
Table created, but not shown under Schemas > public > TablesShort answer
The table usually exists; the tree is showing something else. Refresh the Tables node first. If it is still absent, the table went into another schema or database than the one you are looking at, or the tree hides it. Query the catalog to see where it really is.
Fix it fast
1Find out which cause you have
Ask the database where the table really is, ignoring the tree.
SELECT table_schema, table_name FROM information_schema.tables WHERE table_name = 'my_table';2Match what you see, then jump to its fix
- 1
The query above finds the table in the schema you expectedThe tree has not been refreshedFix - 2
The query returns a schema other than the one you opened in the treeThe table was created in another schemaFix - 3
The first-step query finds nothing at all when run from the database you are browsingThe Query Tool was connected to a different databaseFix - 4
The table is found by the query, in the right schema, and refresh does not show itThe tree hides the object type or the databaseFix
- 1
What does the error look like?
Table created, but not shown under Schemas > public > TablesCREATE TABLE succeeded in the Query Tool, tree unchanged
Cause 1 of 4
The tree has not been refreshed
1Check
The tree may still show the list it loaded before your CREATE TABLE ran. Refresh asks the server for the current state of the selected object.
-- in the tree: right-click Tables2Fix
Right-click the Tables node (or the schema, or the database) and choose Refresh.
-- Tables > right-click > Refresh...3Verify
The table appears under Tables.
SELECT to_regclass('public.my_table');Confirmed by pgadmin.org
Cause 2 of 4
The table was created in another schema
1Check
A CREATE TABLE without a schema name goes into the first schema of search_path, which is not always public (a schema named after your user comes first by default).
SHOW search_path;2Fix
Look under that schema in the tree, or move the table to the schema you want.
ALTER TABLE my_user.my_table SET SCHEMA public;3Verify
The table is now listed in public.
SELECT table_schema FROM information_schema.tables WHERE table_name = 'my_table';Confirmed by postgresql.org
Cause 3 of 4
The Query Tool was connected to a different database
1Check
Each connection works in one database. A table made while connected to postgres does not exist in my_db.
SELECT current_database();2Fix
Run CREATE TABLE again in the right database, or open a Query Tool from that database's own context menu.
-- Tree: right-click my_db > Query Tool3Verify
current_database() returns the database you browse.
SELECT current_database();Confirmed by postgresql.org
Cause 4 of 4
The tree hides the object type or the database
1Check
With Show empty object collections turned off, empty collections are hidden, and the server's DB restriction limits which databases are listed.
-- File > Preferences > Browser > Display ; Server > Properties > Advanced > DB restriction2Fix
Turn Show empty object collections on, and clear or correct the DB restriction field.
-- Preferences > Browser > Display > Show empty object collections = on3Verify
Reconnect the server; the collection and database are visible.
-- Tree shows Tables under the schemaConfirmed by pgadmin.org
How do I stop it coming back?
- Write the schema in every CREATE TABLE (public.my_table) so it never depends on search_path.
- Check the database name above the Query Tool tab before you run DDL.
- Refresh the node after DDL run outside the tree.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Databases
DBeaver cannot run pg_restore: the utility is not found in the client home
Utility 'pg_restore' not found in client home '/usr/lib' (/usr/lib)
DBeaver runs pg_restore from a local PostgreSQL client folder; it does not bundle one.
3 causes, each with a fixDatabases
DBeaver cannot download the PostgreSQL driver from Maven
The PostgreSQL driver files are missing and the download does not complete
DBeaver downloads the PostgreSQL JDBC driver from a Maven repository the first time you connect.
3 causes, each with a fixDatabases
python manage.py migrate finishes but the tables for my app are missing
relation "myapp_book" does not exist
migrate only applies migration files that exist.
3 causes, each with a fixDatabases
Django save fails on PostgreSQL: null value in a column violates a not-null constraint
django.db.utils.IntegrityError: null value in column "price" of relation "shop_product" violates not-null constraint
A model field is NOT NULL in the database unless it has null=True.
3 causes, each with a fixDatabases
Django migration on PostgreSQL stops with 'pending trigger events'
django.db.utils.OperationalError: cannot ALTER TABLE "mytable" because it has pending trigger events
PostgreSQL runs a Django migration in one transaction.
2 causes, each with a fixDatabases
Django cannot connect to PostgreSQL: connection refused on port 5432, locally or in Docker
Is the server running on that host and accepting TCP/IP connections?
Connection refused means nothing accepted the connection at the host and port Django used.
4 causes, each with a fix