Getting Started
SequelPG is a native macOS application (requires macOS 14.4 Sonoma or later) for browsing and querying PostgreSQL databases. Download it from the download page or build from source.
Once installed, launch the app and create a new connection to your PostgreSQL server. You can manage multiple connections from the start page.
Connections
To connect to a database, click the + button on the start page. Fill in the following fields:
| Field | Description |
|---|---|
| Host | The hostname or IP address of your PostgreSQL server |
| Port | The port number (default: 5432) |
| Database | The name of the database to connect to |
| Username | Your PostgreSQL username |
| Password | Your PostgreSQL password (stored securely in macOS Keychain) |
| SSL Mode | SSL connection mode: Disable, Allow, Prefer, Require, Verify-CA, or Verify-Full |
Click Test to verify the connection, then Connect to open the database. Passwords are cached in memory after the first Keychain read, so you won't be prompted repeatedly when switching connections.
SSH Tunnels
SequelPG supports SSH tunneling for secure connections to remote databases. This is useful when your PostgreSQL server is behind a firewall or only accessible via a bastion host.
To enable SSH tunneling, expand the SSH Tunnel section in the connection form (available on both the start page and the connection sheet). Configure the following:
| Field | Description |
|---|---|
| SSH Host | The hostname or IP of the SSH server (bastion host) |
| SSH Port | The SSH port (default: 22) |
| SSH Username | Your SSH login username |
| Authentication | Choose between key file or password authentication |
| Key File | Path to your private key file (e.g., ~/.ssh/id_rsa) |
| SSH Password | SSH password (stored separately in Keychain) |
SequelPG uses the system ssh binary for tunneling via local port forwarding. The tunnel is automatically established when you connect and torn down when you disconnect.
Structure View
The Structure tab displays the schema of the selected table. You can see column names, data types, nullable status, and default values at a glance.
Select a table from the sidebar Navigator to view its structure. The Inspector panel on the right shows additional metadata about the selected table.
Content View
The Content tab shows the actual rows stored in a table. Rows are displayed in a native macOS Table grid with column sorting, pagination controls, and built-in cell reuse for smooth scrolling.
Click on any row to view its details in the Inspector panel. You can see field-level data, raw values, and metadata for each record. Double-click a cell to edit it inline, or use the inspector sidebar to edit field values. You can also insert new rows and delete existing records.
Query View
The Query tab provides a full-featured SQL editor. Write your SQL statement and press Cmd+Enter (or click Run) to execute it.
Results appear below the editor in a data grid. When a SELECT query returns zero rows, SequelPG resolves and displays the column headers from table metadata so you can still see the result structure. You can also use the Stop button to cancel a running query and Clear to reset the editor.
SQL Editor
The SQL editor in SequelPG includes several advanced features to help you write queries faster and more accurately:
Syntax Highlighting
SQL keywords, strings, comments, numbers, and operators are highlighted with distinct colors that adapt to both light and dark mode. The highlighting updates in real time as you type.
Autocompletion
As you type, the editor suggests completions from SQL keywords and your database metadata — including schema names, table names, and column names. This makes it easy to reference the correct identifiers without switching to the structure view.
Query Formatter (Beautify)
Click the Beautify button to automatically format your SQL query with proper indentation and line breaks. The formatter also auto-quotes mixed-case identifiers for PostgreSQL compatibility, so queries work correctly with case-sensitive table and column names.
Inspector Panel
The Inspector panel appears on the right side of the interface. It provides context-sensitive details about the currently selected object.
When a table is selected, the Inspector shows the object name, approximate row count, and column count. When a row is selected in Content view, it shows the full row detail with all field values.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Cmd+Enter | Execute the current SQL query |
Cmd+Shift+W | Disconnect and return to the start page |
Up/Down Arrow | Navigate between rows in Content view |