Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions customization/notifications.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Notifications
description: Which finished operations notify you, how long work has to run first, and what the notification carries
description: When finished work notifies you, how long it has to run first, and what the notification carries
---

You only get told when the result is somewhere you are not. That means TablePro behind another window or in another Space, the window minimized, or the tab that ran the work not the one on screen. Work you cancelled yourself never notifies, and neither does anything that finished faster than the threshold.
Expand All @@ -14,19 +14,10 @@ You only get told when the result is somewhere you are not. That means TablePro

| Setting | Default | Covers |
| --- | --- | --- |
| **Notify when long-running work finishes** | On | The master switch for every kind in this table |
| **Notify when long-running work finishes** | On | Every kind of work below |
| **Only after** | 20 seconds | How long work has to run to count: 5, 10, 20 or 30 seconds, or 1, 2, 5 or 10 minutes |
| **Queries** | On | Editor queries, including Explain |
| **Statement batches** | On | Execute All Statements, as one notification for the batch |
| **Row edits** | On | Saving edited rows |
| **Structure changes** | On | Applying table structure changes |
| **Imports** | On | File imports |
| **Exports** | On | Exports, including streaming exports |
| **Object copies** | On | Copy To and Duplicate Database |
| **Backups** | On | Database dumps |
| **Fetch all rows** | On | Loading every row of a truncated result |
| **AI and MCP queries** | On | Queries an AI assistant or MCP client runs |
| **AppleScript queries** | On | Queries [a script](/developers/applescript) runs |

The kinds that count: editor queries including Explain, Execute All Statements as one notification for the batch, saving edited rows, structure changes, imports, exports, Copy To and Duplicate Database, database dumps, fetching every row of a truncated result, and queries an AI assistant, an MCP client or [a script](/developers/applescript) runs.

Keep **Only after** below the [query timeout](/customization/general-settings#query-timeout), or a query that times out finishes before its notification is due.

Expand Down
1 change: 0 additions & 1 deletion customization/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ What a fresh install ships with, so one glance down this column says what you ch
| Data | Keep saved changes for restoring | On |
| Notifications | Notify when long-running work finishes | On |
| Notifications | Only after | 20 seconds |
| Notifications | Every operation kind | On |
| AI | Enable AI Features | On |
| AI | Enable inline suggestions while typing | Off |
| AI | Debounce | 500 ms |
Expand Down
4 changes: 2 additions & 2 deletions databases/postgresql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Any server from 9.1 on works. A feature the server predates stays out of the sid
|---|---|
| Materialized views | 9.3 |
| BRIN indexes, the **Bypass row level security** role attribute | 9.5 |
| Declarative partitioning, identity columns, renaming an enum label | 10 |
| Declarative partitioning, identity columns | 10 |
| Generated columns | 12 |

<Frame caption="PostgreSQL connection form">
Expand Down Expand Up @@ -104,7 +104,7 @@ A value the list cannot represent opens the text editor instead: a multi-dimensi

## User-defined types

Enums, composites, domains and ranges are listed under **Types** in each schema, the `CREATE` statement rebuilt from `pg_type`. An enum's labels are edited in place with `ALTER TYPE … ADD VALUE` and, from PostgreSQL 10, `RENAME VALUE`; PostgreSQL has no statement that drops or reorders a label. The structure editor's type picker offers the schema's types under **User-Defined**. See [User-Defined Types](/features/user-defined-types).
Enums, composites, domains and ranges are listed under **Types** in each schema, the `CREATE` statement rebuilt from `pg_type`. The structure editor's type picker offers the schema's types under **User-Defined**. See [User-Defined Types](/features/user-defined-types).

## Views and comments

Expand Down
2 changes: 1 addition & 1 deletion developers/mcp-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ On Redis the three actions are `MULTI`, `EXEC` and `DISCARD`. Every command betw
| `list_grants` | `connection_id`, `principal` (`host`) | `principal`, `grants[]` (`privilege`, `scope`, `is_grantable`). `scope` is a dotted path, `*` for a server-wide grant |
| `list_session_contexts` | `connection_id` | `is_supported`, `contexts[]` (`id`, `label`, `value`, `options[]`) |

`get_server_dashboard` reads the live panels TablePro shows, and runs on PostgreSQL, MySQL, SQL Server, ClickHouse, DuckDB and SQLite. Name the panels in `panels[]` or omit it for all three. A session carries `id` (the process id `stop_server_session` takes), `user`, `database`, `state`, `duration_seconds`, `query`, `can_kill` and `can_cancel`; a metric carries `id`, `label`, `value`, `unit`; a slow query carries `duration`, `query`, `user`, `database`. A panel the server could not answer is left out, and `errors` names it: one fixed sentence per panel, keyed by panel name. The server's own message is not sent to the client; it goes to the app's log, where the user can read it. When every requested panel fails, the call fails.
`get_server_dashboard` reads the live panels TablePro shows, and runs on PostgreSQL, MySQL, SQL Server, ClickHouse and Typesense. Name the panels in `panels[]` or omit it for all three. A session carries `id` (the process id `stop_server_session` takes), `user`, `database`, `state`, `duration_seconds`, `query`, `can_kill` and `can_cancel`; a metric carries `id`, `label`, `value`, `unit`; a slow query carries `duration`, `query`, `user`, `database`. A panel the server could not answer is left out, and `errors` names it: one fixed sentence per panel, keyed by panel name. The server's own message is not sent to the client; it goes to the app's log, where the user can read it. When every requested panel fails, the call fails.

`stop_server_session` takes `mode` as `cancel` (default) to stop the running query or `kill` to end the session. SQL Server, ClickHouse and MySQL before 5.0 take only `kill`: their sessions report `can_cancel` false, and `cancel` fails with `invalid_argument`. The user always approves this one, whatever Safe Mode says.

Expand Down
51 changes: 36 additions & 15 deletions features/backup-restore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,42 @@ MySQL's clients and MariaDB's no longer take the same flags. MySQL's take `--ssl

MariaDB's clients have no flag for encrypting without verifying, so **Required** reaches them as `--ssl --ssl-verify-server-cert`. That refuses a server offering no TLS. With no CA certificate set it checks the encryption rather than the server's identity.

## Server-side export

Oracle, Snowflake and BigQuery do not have a client-side dump. They unload to somewhere the server can write: a `DIRECTORY` object, a stage, a Cloud Storage bucket. Choose **File > Server-Side Export…** for those.

Pick a table and name the destination. Oracle takes the name of a `DIRECTORY` object rather than a path, because the path belongs to the server. Snowflake takes a stage, with or without its `@`. BigQuery takes a `gs://` prefix and shards its output under it.

The statement runs on your own connection, so it carries your privileges and the server's own error comes back when the destination is not writable.

Snowflake and BigQuery block until the unload finishes, so the file exists by the time the sheet says so. **Stop** asks the server to cancel one and stops waiting either way.

Oracle is different. The Data Pump block starts a job and detaches, so the statement returns before anything is written and the sheet says the job was started rather than finished. Watch `DBA_DATAPUMP_JOBS` for its progress, and stop it there.

<Info>
Nothing lands on your Mac. The result is on the server or in the bucket, and the sheet says where it went.
</Info>
## Unloading on the server

Oracle, Snowflake and BigQuery have no client-side dump. Unload to somewhere the server can write by running the engine's own statement in a query tab. It runs with your privileges, so the server's own error comes back when the destination is not writable.

<CodeGroup>
```sql Oracle
DECLARE
h NUMBER;
BEGIN
h := DBMS_DATAPUMP.OPEN('EXPORT', 'TABLE');
DBMS_DATAPUMP.ADD_FILE(h, 'orders.dmp', 'DP_DIR');
DBMS_DATAPUMP.ADD_FILE(h, 'orders.log', 'DP_DIR', NULL, DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
DBMS_DATAPUMP.METADATA_FILTER(h, 'SCHEMA_EXPR', 'IN (''SALES'')');
DBMS_DATAPUMP.METADATA_FILTER(h, 'NAME_EXPR', 'IN (''ORDERS'')');
DBMS_DATAPUMP.START_JOB(h);
DBMS_DATAPUMP.DETACH(h);
END;
```

```sql Snowflake
COPY INTO @my_stage/orders
FROM sales.orders
FILE_FORMAT = (TYPE = CSV, COMPRESSION = GZIP, HEADER = TRUE)
OVERWRITE = FALSE;
```

```sql BigQuery
EXPORT DATA OPTIONS (
uri = 'gs://my-bucket/orders-*.csv',
format = 'CSV',
overwrite = false
) AS SELECT * FROM sales.orders;
```
</CodeGroup>

In the Oracle block, `DP_DIR` is a `DIRECTORY` object, not a path. The block starts a Data Pump job and returns before the file is written: watch `DBA_DATAPUMP_JOBS` for its progress. BigQuery needs the `*` in the URI, because it shards its output.

## Passwords

Expand Down
1 change: 0 additions & 1 deletion features/connection-window.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ The toolbar is still yours to arrange. Choose **View > Customize Toolbar**, or r
| **Results** | The query editor's results pane (`Cmd+Option+R`) |
| **Export** | Export Tables (`Cmd+Shift+E`) |
| **Import** | The import format list (`Cmd+Shift+I`) |
| **Dashboard** | The [server dashboard](/features/server-dashboard) |
| **History** | The [query history](/features/query-history) drawer (`Cmd+Y`) |

A control you add yourself stays put. It stands in every context and dims when it has nothing to do, rather than leaving the way the default eight do. Your arrangement, and the **Show** setting in the same sheet, survive a relaunch.
Expand Down
2 changes: 1 addition & 1 deletion features/er-diagram.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ A table whose primary key is made of two foreign keys, `user_roles` and its like

**Export as PNG** renders the whole diagram at twice screen resolution with 40 points of padding, whatever the current zoom and scroll position, and saves it as `er-diagram.png`. `Cmd+C` puts the same image on the clipboard. Compact mode and expanded junction tables carry into the render, so set the view up first.

**Export as SQL** opens a query tab with `CREATE TABLE` and foreign key statements for the diagram's tables in the connection's dialect. SQLite inlines the foreign keys; other engines add them afterwards with `ALTER TABLE … ADD CONSTRAINT`, so the script survives circular references.
For the tables' DDL, choose **File > Export > Export Tables…**, pick SQL and leave **Structure** on. See [Import & Export](/features/import-export).

## Database support

Expand Down
6 changes: 2 additions & 4 deletions features/server-dashboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Monitor active sessions, server metrics, and slow queries in real t

What this screen shows is what your account is allowed to see. A MySQL user without the `PROCESS` privilege gets only its own connections in the session list. A PostgreSQL role that is neither a superuser nor a member of `pg_monitor` gets everyone's backends with the Query column blank. An empty or half-blank dashboard is nearly always a privilege, not a fault.

Open it from **Database > Server Dashboard**, or from **Server Dashboard** under **Actions** in the toolbar. A **Dashboard** button is in the palette too, through [Customize Toolbar](/features/connection-window#add-a-control-back).
Open it from **Database > Server Dashboard**, or from **Server Dashboard** under **Actions** in the toolbar.

<Frame caption="Server Dashboard showing active sessions, metrics, and slow queries">
<img
Expand Down Expand Up @@ -57,7 +57,5 @@ The interval menu offers 1s, 2s, 5s (the default), 10s, 30s, and Off. **Pause**
| MySQL / MariaDB | Yes | Connected threads, running threads, uptime, total queries, slow queries, max connections, bytes received, bytes sent | Yes | Yes | Yes |
| SQL Server | Yes | User sessions, uptime, database size | Yes | - | Yes |
| ClickHouse | Yes | Active queries, active merges, part mutations, disk usage | Yes | - | Yes |
| DuckDB | - | Database size, block size, total blocks, memory limit, threads | - | - | - |
| SQLite | - | Database size, page count, page size, journal mode, cache size | - | - | - |

Every other engine has no dashboard provider. The menu item dims, **Actions** leaves the entry out, and a **Dashboard** button you added to the toolbar dims.
Every other engine, SQLite and DuckDB included, has no dashboard. The menu item dims and **Actions** leaves the entry out.
45 changes: 11 additions & 34 deletions features/user-defined-types.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: User-Defined Types
description: Browse a schema's enums, composites, domains and ranges, read each definition, and add or rename an enum's labels in place
description: Browse a schema's enums, composites, domains and ranges and read each definition
---

Expand a schema and **Types** sits beside **Functions** and **Triggers**, one row per enum, composite, domain and range the schema declares. Select a row and press Return, or double-click it, and the type's `CREATE` statement opens in a tab.

<Frame caption="An enum open from the Types section, its labels listed above the definition">
<img className="block dark:hidden" src="/images/user-defined-types-sidebar.png" alt="Sidebar tree with the Types section expanded under a PostgreSQL schema, and a tab showing an enum's labels with the rebuilt CREATE TYPE statement under them" />
<img className="hidden dark:block" src="/images/user-defined-types-sidebar-dark.png" alt="Sidebar tree with the Types section expanded under a PostgreSQL schema, and a tab showing an enum's labels with the rebuilt CREATE TYPE statement under them" />
<Frame caption="An enum open from the Types section">
<img className="block dark:hidden" src="/images/user-defined-types-sidebar.png" alt="Sidebar tree with the Types section expanded under a PostgreSQL schema, and a tab showing the rebuilt CREATE TYPE statement" />
<img className="hidden dark:block" src="/images/user-defined-types-sidebar-dark.png" alt="Sidebar tree with the Types section expanded under a PostgreSQL schema, and a tab showing the rebuilt CREATE TYPE statement" />
</Frame>

## Engine support

| Engine | Types listed | Enum labels editable |
|---|---|---|
| PostgreSQL, PGlite | Enums, composites, domains, ranges | Yes |
| SQL Server | Alias types, table types, CLR types | No |
| Every other engine | None | No |
| Engine | Types listed |
|---|---|
| PostgreSQL, PGlite | Enums, composites, domains, ranges |
| SQL Server | Alias types, table types, CLR types |
| Every other engine | None |

A table's own row type, the array type created beside every type, the multirange created beside every range, and any type an extension installed are left out. A type in another schema is listed under that schema. On SQL Server the built-in types are left out too, so the section holds only what the database declares.

Expand All @@ -30,32 +30,9 @@ On SQL Server nothing is stored to read back at all, because a type has no `sys.

A SQL Server table type is a table-valued parameter and cannot declare a column, so it is left out of the column type picker. Alias types appear there.

## Editing an enum's labels

An enum's labels are listed above its definition in the order the server keeps them. Each edit runs as one `ALTER TYPE` statement the moment it is committed, on a connection of its own rather than inside a transaction open in a query tab; there is nothing to save afterwards, and the statement lands in the query history.

<Steps>
<Step title="Add a label">
Click **+** under the list to append one, or right-click a label and choose **Add Label Before…** or **Add Label After…** to place it. Type the label and press Return. Escape discards it.
</Step>
<Step title="Rename a label">
Double-click a label, or right-click it and choose **Rename…**, edit it and press Return.
</Step>
</Steps>

<Info>
Renaming needs PostgreSQL 10 or later. On an older server the **Rename…** item is absent and a double-click does nothing.
</Info>

Safe Mode applies as it does to any schema change. A connection set to read-only shows the labels without the controls, and Confirm Writes asks before the statement runs.

### What cannot change

PostgreSQL has no statement that removes a label or moves an existing one. To drop a label, create a new type without it, switch every column over, and drop the old type; **Open in Editor** puts the current definition in a query tab as the starting point.

## Creating a type
## Changing or creating a type

Right-click the **Types** section and choose **New Type…**. A query tab opens with a `CREATE TYPE … AS ENUM` template addressed to that schema. Edit it, run it, then choose **Refresh** on the section.
The tab is read-only. **Open in Editor** puts the definition in a query tab; write the `ALTER TYPE` or `CREATE TYPE` there and run it, then choose **Refresh** on the **Types** section. On PostgreSQL, `ALTER TYPE … ADD VALUE` adds an enum label and, from PostgreSQL 10, `RENAME VALUE` renames one. No statement removes a label or moves an existing one.

## Using a type in a column

Expand Down
Binary file modified images/user-defined-types-sidebar-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/user-defined-types-sidebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading