pgen for Mac

The latest version of pgen for Mac is 1.21.0, released . PostgreSQL client.

What's new in pgen 1.21.0

  • A new SQL editor. The query, function and view editors share one editor built for pgen. It handles typing, selection, undo and input-method composition (predictive text, non-Latin keyboards) itself, and carries pgen's autocomplete, smart Enter, ⌘/ comment toggle and run shortcuts.
  • Auto-closing pairs. Typing (, [, ' or " adds the closing character, and typing one over a selection wraps it. Pairs are not added inside strings or comments.
Show 3 more
  • Autocomplete that stays out of the way. The suggestion list closes when nothing matches what you typed, and Backspace brings it back. It also closes once the word is complete. Ctrl+Space or Option+Esc with nothing to offer shows "No suggestions".

Fixes

  • Autocomplete treats each statement on its own: after a ;, the next statement is offered keywords, and a ; inside a string, a comment or a dollar-quoted function body does not end the statement.
  • Run Selected (⌘⇧↩) runs the selection while the suggestion list is open, without accepting a suggestion.

Source: Developer’s update feed

How to update pgen on your Mac

pgen version history

  1. 1.21.0
  2. 1.20.0
    • Dashboards. ⌘3 opens Dashboards: grids of widgets you build yourself. Choose numbers, trends, line, bar and donut charts, tables or gauges, and drive each one with your own SQL, a saved query, or a built-in server metric. Every dashboard has a shared time range, live refresh, per-widget schedules and warning/critical thresholds, and each connection starts with an editable Server health dashboard.
    • No-code Table widgets. Pick a table or view, a measure, filters, an optional Top N group-by and a time column, and pgen writes the query. "Edit as SQL" opens it in a SQL tab when you want to take it further.
    • Arrange dashboards by dragging. In Edit mode (E), a card follows the cursor with a live preview of where it will land, neighbours move aside, and the layout stays packed with no overlaps. Resize from the right edge, bottom edge or corner; Esc cancels.
    • Widgets are read-only. Each widget runs a single SELECT inside a read-only transaction, with a statement timeout and a row cap.
    • Read-only connections cover every change. Table edits, imports, schema and object changes, and EXPLAIN ANALYZE all respect a read-only connection, and production connections prompt with the exact SQL before anything runs.
    • Atomic table edits. Grid edits find their row by primary key, are checked to touch exactly one row, and commit together in one transaction. Other tabs showing the same table refresh when you commit.
    • Atomic schema changes. The schema wizard applies a multi-statement change in one transaction, so a failing step rolls back the whole change.
    • Transactional imports. With "Use transaction" on, the whole import is one transaction and Cancel rolls it back. Without it, Cancel stops after the current batch and reports how many rows landed. Progress updates batch by batch.
    • Safer view editing. New View never replaces an existing view of the same name, and replacing a materialized view runs in one transaction, with a warning that its indexes, grants and comments go with it.
    • Closing a SQL tab cancels its query. ✕ or ⌘W stops the tab's running statement on the server.
    • AI conversations belong to their connection. Switching connections starts a fresh conversation, Run on a suggested query targets the conversation's own database, and Stop ends the reply along with any tool calls still queued.

    Fixes

    • CSV imports use the delimiter, quote and header settings shown in the preview.
    • JSON values import into jsonb columns as valid JSON.
    • Overwrite-mode imports update existing rows by primary key (ON CONFLICT).
    • "Load more" works on a table tab that opened from cache.
    • An Explorer folder that fails to load shows the error.
    • Double-clicking an already-selected grid cell opens the editor.

    Other

    • pgen requires macOS 12 (Monterey) or later.

    Source: Developer’s update feed

  3. 1.19.0
    • Comment SQL with ⌘/. Toggles -- on the caret's line or across every line in a selection, and switches to a / / block when the selection covers part of a line. Repeat the shortcut to uncomment.
    • Choose which models you see. Each provider's page lists the models it offers with a checkbox per row, so the model picker carries only the ones you actually use. The provider chip reads Connected · 4 of 62 enabled, and the AI panel points back to Settings when a provider has none enabled.
    • A page per AI provider. Provider settings open as a full-height page rather than an expanding card — name and connection status at the top, API key and model list in the body, and Test Connection, Cancel and Save pinned in a footer that holds its place while you scroll. Base URL and max tokens sit under an Advanced disclosure, open by default for Ollama and custom providers.
    • Write-only API keys. A saved provider key can be replaced but never read back — the stored secret never returns to the form.
    • See what leaves your machine. Switch off "include database schema in AI context" and the panel shows a Not sent / Still sent ledger above the composer, both halves side by side so the second one is hard to skim past. Documents you have open — the query you're asking about, a function body, a view's SQL — are the subject of the question and travel with it.

    Performance

    • AI chat replies start faster on large databases, and stay fast as a conversation runs long.

    Source: Developer’s update feed

  4. 1.18.0
    • A new coat of ink. The default dark theme moves to the ink palette from pgendb.com — deeper surfaces, cooler neutrals, and an accent held back for primary actions. Selected rows in the object tree, the workspace rail and the settings dialog all read as one quiet neutral wash. The light theme picks up the same cooler cast.
    • A new app icon. An origami pigeon, redrawn at every icon size and carried through the app.
    • Settings, rebuilt. General, Editor and AI sit on one shared set of components, so section labels, fields and toggles line up the same way on every tab. Toggles flip from anywhere on their row, controls take keyboard focus in order, and each switch carries its own label for screen readers.

    Fixes

    • Extension tabs load their detail panel and the full list of objects an extension owns. Every object kind is named through pgdescribeobject — operator classes, operator families, casts and access methods alongside functions, types and tables — and an extension the size of pgvector lists all 237 of its objects.
    • Viewing a table's triggers lists them.
    • A SQL block in an AI reply gets its Run button whether the code fence is tagged sql or SQL, and the prose around the block renders once.
    • Running a SQL block from the AI panel shows the outcome under that block, and each block in a reply tracks its own run separately.

    Source: Developer’s update feed

  5. 1.17.0
    • Run transcript. Every run in the SQL editor is recorded as a line in a per-tab log — a status glyph, the statement echoed in the editor's own syntax colors, row counts, and a timestamp. Scroll back through a tab's recent runs to see exactly what you ran and what came back.
    • Per-statement rows in Messages. Each statement of a multi-statement script gets its own transcript row with its row count and execution time. Tap a row to expand the full SQL as selectable text.
    • Saved Queries in the right tool strip. Saved Queries joins Query History as a switchable tool in the workspace's right strip, sharing the same two-action tiles.
    • Insert into the current editor. Recalling a query from History or Saved Queries can merge it into the query you are already writing instead of replacing it — it lands on a fresh line, and a single undo steps back over it.
    • Middle-click to close tabs. Works on SQL editor tabs and workspace tabs alike.
    • Clear feedback on runs that don't execute. When a run is refused by a connection's safety settings or cancelled mid-flight, the results panel explains the cause, names the statement responsible, and links to that connection's settings.

    Fixes

    • Reconnecting after a dropped connection keeps you in the workspace you were working in, and the object tree refreshes against the reconnected session.
    • A retry after a failed connection attempt re-establishes the connection.
    • The connections list, the connection switcher, and the command palette show the connection that is currently live.
    • The Manage Connections dialog stays open when a connection attempt fails, so you can correct the details and try again.
    • Failed connection attempts are reported once, from every screen that can start one.
    • Editing a connection profile applies the change to the open connection.
    • The line-number gutter fits two-digit line numbers without wrapping, and the autocomplete popup stays inside the window near the bottom of the screen.

    Plain autocomplete is on ⌥Esc (and Ctrl+Space).

    Source: Developer’s update feed

  6. 1.16.0
    • Redesigned model picker. A house-style popover anchored to the model pill lets you fuzzy-search across every model your providers expose and switch in a keystroke.
    • Model pill in the composer. The pill sits right where you type, with short labels and an inferred-capabilities dot so you always know what you're sending to.
    • One-tap starters. Empty-state prompts double as suggestions that drop straight into the composer.
    • Removable context chip. See exactly what schema context the assistant is working with, and detach it for a clean-slate question.
    • Readable in-flight and errors. A copper "Thinking…" shimmer marks requests in flight, and provider errors render as cards with an expandable details view.
    • Adaptive layout. The AI panel becomes a readable, content-sized column on wide screens, and markdown tables fill the available width.
    • Per-connection query history. Each database keeps its own separate history, and workspace tabs are restored when you switch back to a connection.

    Source: Developer’s update feed

  7. 1.15.1
    • Streaming query results. Large result sets load page by page through a server-side cursor, so the grid stays responsive and memory stays in check on big queries instead of waiting for everything at once.
    • Adaptive AI schema context. The AI assistant scales how much database schema it sends with each request to fit your selected model's context window.

    Source: Developer’s update feed

  8. 1.15.0
    • Pick up where you left off. Reconnect to a database and pgen reopens your workspace as you left it — your open table tabs, your SQL editor tabs with their query text intact, and the view you were working in. Data loads fresh on reconnect.
    • Reconnect on launch. Turn on a startup option to have pgen reconnect to your most recent connection automatically when you open the app, so you land straight in your workspace.

    Source: Developer’s update feed

  9. 1.14.0
    • Instant Explorer. The database object tree appears the moment you connect — loaded from a local cache and refreshed in the background as you work.
    • Instant everywhere. Table data, the server dashboard, the ER diagram, and the SQL, function, and view editors reopen instantly from cache and refresh in the background, so moving between them stays snappy.
    • Faster connections. Loading your schema on connect uses far fewer database round-trips — a noticeable speedup on pooled or remote databases.

    Source: Developer’s update feed

  10. 1.13.1
    • Guided recovery screen if macOS denies pgen the file access it needs at launch, with a one-click shortcut into System Settings.

    Source: Developer’s update feed

  11. 1.13.0
    • Transparent reconnect across the entire app. Every database operation — table reads and edits, EXPLAIN plans, schema changes, dashboard refreshes, imports, exports, AI tools, function / view / trigger editors, explorer expansions — runs through a single recovery path. When the database connection drops, the app reconnects in the background and the work resumes uninterrupted. If recovery exhausts its retries, a non-modal toast surfaces the failure with a retry action.
    • Silent reconnects. The first connection to a database shows a brief progress overlay while pgen verifies the link. Subsequent reconnects run in the background without interrupting your work.
    • Polished query editor surfaces. Unified background tones across the editor and results pane, tightened dividers between sections, and a leaner results strip that hides the outer tab row when there's no EXPLAIN plan to show.

    Source: Developer’s update feed

  12. 1.12.0
    • Pooler reconnect status banner. When the database connection drops, the query editor shows a live banner while the app reconnects to the pooler. The banner updates as the reconnect progresses, so you can watch the recovery happen without leaving the editor.
    • Connection-aware workspace. Every workspace panel — Explorer, Dashboard, ER diagram, Table Viewer, function/view/trigger editors, Index Advisor, Schema Wizard, Import / Export, and AI assistant — resolves the active database connection on every operation. Works with Supabase, Neon, RDS Proxy, Crunchy Bridge, and self-hosted PgBouncer.

    Source: Developer’s update feed

  13. 1.11.0
    • Refreshed brand palette. Copper accent paired with a slate-cool neutral scale, in line with the redesigned pgendb.com.
    • New typography. Hanken Grotesk across the interface, with Instrument Serif used for editorial accents.
    • Brand-aligned SQL editor. A new syntax-highlight palette tuned for the copper + slate scheme, with a unified gutter and selection treatment.
    • Unified workspace surfaces. The explorer, query results, and editor pane share a single content surface — same background, same border treatment, same elevation feel.
    • Sharpened light theme. Brighter scaffold, clearer card edges on white, and softer hover states for long sessions over dense data grids.
    • Title bar polish. Breathing and elevation tuned to match the website's hero treatment.

    Source: Developer’s update feed

  14. 1.10.0
    • Read-only connection mode. A per-connection toggle marks a profile as read-only. Right after the handshake, pgen issues SET defaulttransactionreadonly = on, so any stray mutation hits a server-side error — and at the UI layer the same toggle gates query runs, inline cell edits, and schema-wizard DDL. The status bar surfaces a Read-only lock segment so you always know which mode you're in.
    • Production mutation guard. Connections tagged Production gain a "Block production mutations" toggle. With it on, the first mutation in a session opens a confirm dialog with three actions — Cancel, Allow once, or Allow until disconnect. Approvals are session-scoped per profile and are cleared the moment you disconnect. The status bar shows a Locked segment for blocked production and a Production warning segment otherwise.
    • Default safety LIMIT on SELECT. Bare SELECT statements (without an explicit LIMIT) automatically wrap in LIMIT 1000 so a forgotten predicate doesn't pull a million rows into the result grid. The cap is configurable, and the whole feature is toggleable, under Settings → Editor → Query Safety. When a query was capped, the results panel surfaces a chip with a one-click Run without limit override that re-runs the same script with the cap turned off for that run.
    • Server-side query cancellation. The cancel button issues pgcancelbackend from a sibling connection, stopping the running statement on the server. A long ANALYZE, a runaway SELECT, or a stuck pgsleep halts the moment you hit cancel.

    Source: Developer’s update feed

  15. 1.9.0
    • Show Dependencies dialog. Right-click any object → Show Dependencies and see exactly what depends on it and what it depends on. Find every view, function, or constraint that would break before you drop a column or rename a table.
    • View Details for types, extensions, and roles. A read-only details dialog for each — full type definition (with composite attributes and enum labels), extension metadata, and role attributes / memberships — without leaving the explorer.
    • Reset Sequence dialog. Right-click a sequence → Reset, pick the next value, and the generated ALTER SEQUENCE … RESTART WITH … opens in a new SQL tab for review before you run it.
    • Copy Definition and View Definition. Both actions output the full CREATE statement for any object — table, view, extension, role, foreign table, and more. View Definition opens it in a SQL tab; Copy Definition puts it on the clipboard with proper identifier quoting.
    • Create new sequences, enums, domains, composite types, triggers, and indexes from the explorer. Right-click a folder → New and a SQL tab opens pre-filled with a CREATE template for that object type, ready for you to fill in.
    • Run Function from the function editor. Type your arguments into the parameter-binding panel and invoke the function from the same place you read or edit it. View Trigger Function automatically opens the trigger's underlying function the same way.
    • Reveal Referenced Table jumps the explorer to the target. Right-click a foreign-key column → Reveal Referenced Table and the explorer scrolls the destination row into view, expanding every ancestor — schema, folder, table — along the way.
    • All six PostgreSQL SSL modes. The connection form supports the full set — disable, allow, prefer, require, verify-ca, and verify-full. Verify-ca and verify-full validate the server's certificate against a trusted CA so you can be sure you're connecting to the server you intend to.
    • Client certificate authentication. PEM file pickers in the connection form for client certificate, client key, and CA certificate. pgen validates the files before it tries to connect and tells you if one is missing, unreadable, or if you've supplied only half of a cert / key pair.
    • SSL-aware import from pgAdmin and TablePlus. Connection profiles imported from either tool map allow, prefer, verify-ca, and require to your imported profile distinctly.

    Source: Developer’s update feed

  16. 1.8.0

    Features

    • Connect to PostgreSQL through an SSH tunnel. New connection profiles can now route through a bastion / jump host before reaching your database. Configure SSH host, port, user, and password directly in the connection form — the tunnel is brought up before the Postgres handshake and torn down cleanly when you disconnect.
    • Host-key verification with a proper trust dialog. On the first connection to a new SSH host, pgen shows a Material dialog with the host's fingerprint and lets you decide whether to trust it. Trusted keys are remembered in pgen's own known-hosts store. If a host key changes later, pgen blocks the connection and tells you exactly why — no silent acceptance.
    • SSH-aware error reporting. When something goes wrong inside the tunnel — auth failure, bad host key, network reset, tunnel never came up — the connection toast tells you it was the SSH layer, not the database. No more guessing whether a failed connection was your bastion or your Postgres credentials.
    • ⌘⇧F opens Query History from anywhere in the workspace.

    Fixes

    • Identifier quoting now matches quoteident. Schemas, tables, columns, and other identifiers with mixed case, reserved words, or special characters are now properly quoted everywhere — table viewer reads, edits, and the underlying introspection queries. Mixed-case schema names like "MyApp" no longer break View Data or inline editing.
    • NULL-safe edits on tables without a primary key. Committing a row edit on a PK-less table now uses IS NOT DISTINCT FROM so NULL-valued columns are matched correctly. If your edit could affect multiple identical rows, pgen now refuses the commit and tells you instead of silently updating all of them.
    • Filter values are cast to the column's type, not the other way around. Filtering an integer column for 42 now sends col = 42, not col::text = '42'. Indexes get used, query plans look like you'd expect, and filters work correctly on types where text-casting was lossy or wrong.
    • Switching to an already-open tab returns you to the Explorer view instead of leaving you on the SQL editor with the tab apparently doing nothing.
    • No more crash when disconnecting with the dashboard open. A race in DashboardBloc where its refresh timer could be armed on a closed bloc — the source of the "Cannot add new events after calling close" reports in 1.7.0 — is fixed.
    • JSON cells with "char"-typed values render again. Postgres returns UndecodedBytes for OIDs without a codec (notably the internal "char" type), which crashed the JSON viewer. pgen now decodes these the same way the rest of the app does.

    Source: Developer’s update feed

  17. 1.7.0

    Features

    • Explorer context menus, rebuilt from scratch. Right-click any object in the database tree and you now get a purpose-built menu for that object type — tables, views, materialized views, functions, procedures, triggers, indexes, sequences, columns, foreign keys, foreign tables, types, extensions, roles, schemas, the database itself, and folder headers each have their own tailored set of actions. The flat one-size-fits-all menu is gone.
    • pgAdmin-quality script generation. Right-click a table → Scripts → SELECT / INSERT / UPDATE / DELETE / MERGE / CREATE. Each script opens in a fresh SQL tab with a proper header comment, fully-qualified identifier, clean indentation, and is primary-key-aware where relevant. CREATE generates real DDL for views, functions, triggers, indexes, sequences, and types too — not stubs.
    • Unified Drop dialog with CASCADE / RESTRICT. One confirmation dialog now covers every droppable object type. Generated statement opens in a new SQL tab so you review and run it yourself instead of pgen silently executing destructive DDL.
    • Truncate dialog with CASCADE and RESTART IDENTITY. Checkbox UI for both PostgreSQL clauses; statement opens in a new SQL tab.
    • Maintenance dialog. VACUUM, VACUUM FULL, ANALYZE, REINDEX TABLE, and REINDEX DATABASE behind a single dialog with an explicit lock-warning callout for the heavier variants.
    • Count Rows with estimate-first fallback. Cheap pgclass.reltuples estimate by default, with an explicit "exact count" option for when you need it.
    • View Data with First 100 / Last 100 / All / Filtered modes. Right-click → View Data and pick the slice you want; honors sort, page size, and unbounded loads through the existing table viewer plumbing.
    • Copy Reference with proper identifier quoting. Copies the fully-qualified, properly-quoted identifier to the clipboard so it pastes correctly into SQL that hits case-sensitive or reserved names.
    • ERD scoped to a single object. ERD For Table / View now opens the entity-relationship diagram focused on the chosen object rather than dumping the whole schema.
    • More SQL-emitting actions. Use in SELECT / INSERT / UPDATE / DELETE templates, Enable / Disable Trigger, Refresh Materialized View, and View Sequence Value all emit real SQL into a new editor tab.
    • Submenus open on hover. A 150ms debounce prevents accidental opens while moving the cursor across the menu; tap-to-open still works.
    • One unified context menu across the app. Explorer, connection hub rows, and the table viewer grid now share a single menu engine with the same compact 32px rows, JetBrains Mono labels, glass-blurred surface, and shortcut hints. Right-clicks feel consistent everywhere.
    • SQL tab keyboard shortcuts. Cmd+T / Ctrl+T opens a new tab and switches to the query editor. Cmd+W / Ctrl+W closes the active tab (keeps the last one open). Cmd+Option+→ / ← and Ctrl+Tab / Ctrl+Shift+Tab cycle through your open tabs with wrap-around.
    • Smarter autocomplete spacing. Accepting clause keywords (SELECT, FROM, WHERE, JOIN, AND, …) now appends a trailing space so the caret is ready for the next token. Terminator keywords (NULL, TRUE, FALSE, ASC, DESC, END) and identifiers still insert verbatim, so nothing inserts a space where you don't want one.

    Source: Developer’s update feed

  18. 1.6.0

    Features

    • EXPLAIN plan view, rebuilt. Run EXPLAIN or EXPLAIN ANALYZE and pgen renders the plan as a navigable tree with continuous branch connectors, a highlighted hot path from the slowest node to the root, and per-node time badges. When ANALYZE data is available, heat coloring reflects exclusive time so parent nodes don't drown out the actual culprits.
    • Results and EXPLAIN as side-by-side tabs. The bottom panel now splits cleanly between Results and Explain Plan instead of one clobbering the other. Running a query auto-switches to Results, running EXPLAIN auto-switches to the plan tab.
    • Copy-plan button. One click puts the raw textual plan on your clipboard — ready to paste into explain.dalibo.com, a bug report, or chat with a colleague.
    • Disk-spill markers and dominant-node summary. Sort nodes that spilled to disk now show a 💾 marker, and when a single node owns ≥30% of execution time you get a one-line callout pointing at it.
    • Selection-aware EXPLAIN. Highlight one statement and pgen EXPLAINs just that one. Multi-statement selections surface a clear toast instead of failing silently.

    Fixes

    • EXPLAIN was effectively unreachable. postgres v3 auto-decodes JSON columns, which broke plan parsing and silently returned no panel. That path now handles both pre-decoded and string inputs, and no longer double-executes mutating queries to get the raw text view.
    • Tree connectors render. Vertical connectors between sibling nodes in the EXPLAIN tree no longer collapse to zero height.
    • No more bottom-panel overflow. Fixed an unbounded intrinsic-height calculation that could overflow the EXPLAIN tree past the panel boundary.
    • Run Selected keeps focus. Editor focus is restored after Run Selected so the highlighted selection stays visible.

    Source: Developer’s update feed

  19. 1.5.1

    pgen 1.5.1 — Wipe-proof connection passwords, live list refresh, query-history preview

    Fixes

    • Wipe-proof connection passwords. Editing a saved connection no longer clears the stored password (or SSH password) when you Save without retyping it.
    • Live connection list. The connection hub, switcher menu, and command palette all refresh instantly when a connection is saved or deleted from anywhere in the app.
    • URI sslmode parsing. Pasted PostgreSQL URIs with sslmode=disable / allow / prefer / require / verify-ca / verify-full now apply the correct SSL setting on import.
    • Hardened connection delete. Keychain quirks during delete no longer surface as a full-screen error, and the workspace cleanly returns to the connection hub when the active connection is the one deleted.
    • Query History preview-on-tap. The history drawer now previews queries inline on tap with explicit Apply to current and New tab actions, instead of single-tap auto-applying. Esc closes the drawer when focus is inside it.

    Source: Developer’s update feed

  20. 1.5.0

    Features

    • Anonymous usage analytics and crash reporting on macOS. pgen now sends a small, bucketed set of events (app opens, connection attempts and outcomes, query executions) so we can see what's actually working and what isn't. The numbers are aggregated — we never see your queries, your data, your connection strings, or anything inside your database. macOS only for now; Windows and Linux builds do not send any analytics.
    • Privacy controls baked in. A new toggle in Settings → General → Help improve pgen turns analytics off instantly and completely. The first-run onboarding mentions it so you've seen the toggle before any event fires. Full details and the event list are at pgendb.com/privacy.

    Source: Developer’s update feed

Details

Latest version
1.21.0
Released
Last checked
Website
pgendb.com
Homebrew cask
pgen