Schema Browser
Table of contents
Overview
The schema browser is the Database Navigator navigator of the sidebar (the third and last icon of the navigator selector in the window toolbar, after Library and Files; View > Navigators > Database Navigator, Cmd+Opt+3). It displays the connected database’s structure as an expandable tree, letting you browse schemas, tables, views, partitions, and columns without writing SQL.
Tree Hierarchy
Tables and views sit directly under their schema as siblings — there are no intermediate “Tables”/”Views” folders:
- Schema (e.g.,
public,auth)- Tables — base tables, foreign tables, and partitioned tables
- Partitions folder — for partitioned tables, when enabled (see below)
- Columns
- Views — regular views and materialized views (shown identically)
- Columns
- Tables — base tables, foreign tables, and partitioned tables
Columns, partitions, and other deep levels load lazily on first expand. The public schema auto-expands on connect when it has 500 or fewer objects; larger schemas expand manually. Double-click a row to toggle expansion.
Icons and Row Details
Every node has a type-specific icon: schemas, tables, partitioned tables, views, and partitions each get their own symbol, and columns get icons based on their data type — a key for primary keys, a calendar for dates and timestamps, a clock for times and intervals, braces for JSON and arrays, a network symbol for inet/cidr, and so on.
The tree is a source list: one line per row, at the row height you set in System Settings > Appearance > Sidebar icon size. Each row carries a short caption on the right of the same line:
- Tables and views — an estimated row count (e.g., “1.2K rows”), populated in the background after connecting
- Partitioned tables — the partition key and partition count (e.g., “by (created_at) · 12 partitions”), plus a colored RANGE/LIST/HASH badge
- Inherited tables — the child count, plus an INHERITS badge, and the row count and size of the whole tree (see below)
- Columns — the data type, plus “PK” and “NOT NULL” markers where applicable
- Partitions — the partition bound (e.g., “FOR VALUES FROM … TO …”, or “DEFAULT”)
When a name is too long for the row, the name truncates and the caption keeps its place — the caption is the only place a column’s type is written on the tree.
Hover a table for its exact row count and its size on disk (“1,234,567 rows · 88 MB”); the Inspector shows the same figures, and lists the table’s columns.
While an import, an export or a clone runs, the table’s row shows its progress: “Importing: N”, “Importing: casting rows…” (the last step of a DuckDB import), “Exporting: N rows”, “Exporting…” (a Parquet export, which has no count until it ends) or “Cloning…”. A job that can stop has a stop button (ⓧ) at the end of the row, and Cancel Import, Cancel Export or Cancel Clone is the first item of the row’s menu. A stopped job shows no error:
- An export stops and writes no file. If a file with that name was there, it is not changed. A PostgreSQL export stops after the batch it is reading.
- A DuckDB import stops and inserts no rows.
- A DuckDB clone stops and leaves no new table.
Nothing Connected
With no connection on the current tab, the panel shows No Connection — “Connect a tab to browse its schema.” Connect the tab (see Connections) and the tree loads in its place.
While the Tree Loads
A large database can take a few seconds to list its tables. Until the tree is there, the panel shows a spinning indicator and what it is reading: “Reading the schemas…”, then “Reading the tables in public…”. The tree replaces it as soon as the tables arrive. A level that loads when you expand it — a table’s columns, a Partitions folder, or a schema when the panel lists every schema — shows a small spinner in a row that says “Reading columns…”, “Reading partitions…” or “Reading tables…”.
If a read fails, the panel says so and shows the server’s message, with a Try Again button.
Partitioned Tables
Partitioned tables are marked with a split-square icon and a RANGE/LIST/HASH badge. When Show leaf partitions is enabled in Settings, expanding a partitioned table reveals a Partitions folder listing each partition; sub-partitioned tables nest recursively, and each partition can be expanded to its own columns. Partitions get a read-only context menu (view contents, export, indexes, constraints) — destructive operations are intentionally reserved for the parent table.
Inherited Tables
Before PostgreSQL 10 there was no PARTITION BY. A table was partitioned by hand: a parent table, one child per period joined to it with INHERITS, and the application choosing the child to write to. PostgreSQL sees those children as ordinary tables, so Pharos lists them flat — which for one table per day over a decade is thousands of rows under one schema.
Group inherited tables in Settings changes that. It is off by default; with it on:
- The root of each tree carries the split-square icon and an INHERITS badge in the place of RANGE/LIST/HASH.
- Its children move into the same Partitions folder, and nest as deep as the tree goes — a year opens into its months, a month into its days. This folder does not need Show leaf partitions: the children have left the top level, so it is the only way to reach them.
- The root’s row count and size are the sum over the whole tree, which is what
SELECT count(*)on the parent returns. A declarative parent already reads this way. - The order comes from Order partitions by. There are no bounds to read in a tree like this, so Partition bound falls back to name order — and a
YYYYMMDDname is already date order.
Two cases stay where they are: a child whose parent is in another schema keeps its place at the top level, because hiding it would leave no way to reach it; and a child of two parents is listed under both, though its rows are counted once.
TRUNCATE on such a parent empties every table below it. The confirmation says so, whether or not this setting is on — see Table Operations.
Schema Selector
The schema selector is the Schema pop-up button in each tab’s context row, after the Connection pop-up button; the pair reads as “this database › this schema”, and both belong to that tab. Click it to open a popover with:
- A Filter schemas… search field
- A scrollable list of schemas, with All Schemas pinned at the top; the active schema is checkmarked and the connection’s default schema is marked “★ default”
- A Set as Default Schema button that saves the current selection to the connection
Selecting a schema focuses the navigator on just that schema’s tables and views; All Schemas restores the full tree. When you switch to a connection, its saved default schema (or public) is selected automatically.
Filtering
Use the Filter field along the bottom of the sidebar (Cmd+Opt+J) to filter the schema tree. Its text is remembered per navigator, so a filter typed here is not carried into Sessions or Results History. Matching is a case-insensitive substring match against schema, table, view, and column names, and matching branches auto-expand to reveal hits. Partition names are also indexed — a partitioned table whose partitions match shows “N matching” without needing to be expanded.
Context Menu Actions
Right-click any node in the schema tree for context-specific actions.
Table Context Menu
| Action | Description |
|---|---|
| View All Contents | Runs SELECT * FROM "schema"."table" as a new query card in the current tab |
| View Contents (Limit…) | Submenu with preset limits: 10, 100, 1,000, 10,000; runs as a new card in the current tab |
| Copy Table Name | Copies the bare table name to the clipboard |
| Paste Name to Query Editor | Inserts the quoted, schema-qualified name into the active editor |
| View Table DDL… | Opens the DDL sheet, which also contains Clone Table |
| Import Data… | Opens the CSV import sheet |
| Export Data… | Opens the export sheet |
| Truncate Table | Removes all rows (with confirmation, if enabled in Settings) |
| Drop Table | Drops the table (with confirmation, if enabled in Settings) |
| View Indexes | Shows the table’s indexes in a detail sheet |
| View Constraints | Shows the table’s constraints in a detail sheet |
View Context Menu
Views (including materialized views) get: View All Contents, View Contents (Limit…), Copy Table Name, Paste Name to Query Editor, Export Data…, Drop View, and View Constraints.
Partition Context Menu
Partitions get a read-only subset: View All Contents, View Contents (Limit…), Copy Table Name, Paste Name to Query Editor, Export Data…, View Indexes, and View Constraints.
An inherited child table inside a Partitions folder gets the same read-only subset. It is a real table, so it can also be reached at the top level whenever Group inherited tables is off, where it has the full table menu.
Schema Context Menu
| Action | Description |
|---|---|
| View Functions | Shows the schema’s functions in a detail sheet |
| Copy Name | Copies the schema name to the clipboard |
Column Context Menu
| Action | Description |
|---|---|
| Copy Name | Copies the column name to the clipboard |
Refreshing
The tree, the schema pop-up and completion refresh automatically when you connect, and after operations that change structure (clone, import, truncate, drop, attach, detach). On a DuckDB connection they also refresh after a card that runs CREATE, DROP, ALTER, ATTACH, DETACH, IMPORT or COMMENT, once the tab has no open transaction. To refresh manually — for example after DDL on PostgreSQL — choose File > Refresh Metadata (Cmd+Shift+R).
The tree is cached per connection, so switching between connections restores instantly. Row-count estimates are gathered in the background (Pharos runs ANALYZE on unanalyzed tables where permitted) and fill in as they arrive.