A native macOS database tool for PostgreSQL, built with SwiftUI. Runs natively on Apple Silicon (arm64) — no Electron, no web views.
- Left — sidebar tree of registered servers; expand a server to see its databases (server → database).
- Centre — SQL console: a monospaced editor on top, a results grid below, with a status bar showing statement count, row count and timing.
- Right — inspector panel, intentionally empty for now (reserved for table structure, query plans, etc.).
- Register any number of Postgres servers (host, port, user, password, maintenance database, optional TLS).
- Server list persists across launches
(
~/Library/Application Support/PostgresPad/servers.json). - Expanding a server connects lazily and lists its non-template databases.
- Console runs against the selected database (or the server's maintenance database when the server row is selected). ⌘↩ to execute.
- Multi-statement scripts: statements are split on
;(quote-, comment- and dollar-quote-aware) and executed sequentially; execution stops at the first error. - Results grid handles arbitrary column sets, with type-aware rendering for text, integers, floats, numerics, booleans, UUIDs, timestamps and JSONB.
- Connections are pooled per server + database and reused between queries.
- Per-server logo badge (symbol + color) to tell connections apart at a glance, shown in the sidebar and the console header.
- Production mode: mark a server as production and its consoles never
auto-commit — statements run inside an explicit transaction (
PRODtag shown everywhere), and changes persist only when you click Commit. Roll Back discards them. - Export: save the displayed result set as CSV or tab-delimited text from the status bar.
- Intellisense: as-you-type completions in the editor — SQL keywords and functions plus live table/column names from the connected database (Esc opens the popup manually).
- Recent tables: the last 10 tables you SELECTed from (per database,
persisted) pop up right after you type
select— picking one completes the query toselect * from <table>. The menu also opens afterfrom(inserts the table name) and anytime via ⌘T; navigate with arrow keys or type to jump, Return inserts.
- macOS 14 (Sonoma) or later, Apple Silicon or Intel
- Xcode 15.3+ (or Swift 5.9+ toolchain)
Postgres connectivity uses PostgresNIO,
a pure-Swift driver — no libpq or Homebrew dependencies required.
From a terminal:
swift runOr open the package in Xcode and hit Run:
open Package.swiftThe first build resolves and compiles PostgresNIO, which takes a couple of minutes; subsequent builds are fast.
- Click + in the toolbar and register a server.
- Expand the server in the sidebar — it connects and lists its databases.
- Select a database, type SQL in the console, press ⌘↩ (or click Run).
- On production servers, use the Commit / Roll Back buttons in the console header to finish the open transaction.
- Passwords are stored in plain text in the servers file for now; Keychain integration is planned.
- The right-hand inspector panel is an empty placeholder by design.
- No cancel button for long-running queries yet.
- Command tag info (e.g. rows affected by
UPDATE) isn't surfaced; statements without a result set report "Statement Executed".