Skip to content
View mariusvs's full-sized avatar

Block or report mariusvs

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
mariusvs/README.md

PostgresPad

A native macOS database tool for PostgreSQL, built with SwiftUI. Runs natively on Apple Silicon (arm64) — no Electron, no web views.

Layout

  • 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.).

Features

  • 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 (PROD tag 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 to select * from <table>. The menu also opens after from (inserts the table name) and anytime via ⌘T; navigate with arrow keys or type to jump, Return inserts.

Requirements

  • 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.

Building & running

From a terminal:

swift run

Or open the package in Xcode and hit Run:

open Package.swift

The first build resolves and compiles PostgresNIO, which takes a couple of minutes; subsequent builds are fast.

Usage

  1. Click + in the toolbar and register a server.
  2. Expand the server in the sidebar — it connects and lists its databases.
  3. Select a database, type SQL in the console, press ⌘↩ (or click Run).
  4. On production servers, use the Commit / Roll Back buttons in the console header to finish the open transaction.

Known limitations / roadmap

  • 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".

Popular repositories Loading

  1. select2 select2 Public

    Forked from select2/select2

    Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.

    JavaScript

  2. docs docs Public

    Forked from dotnet/docs

    This repository contains .NET Documentation.

    PowerShell

  3. experiments experiments Public

    Forked from slayer531/experiments

    A repository to capture simple code experiments

    JavaScript

  4. core core Public

    Forked from dotnet/core

    Home repository for .NET Core

    Shell

  5. mariusvs mariusvs Public

    Config files for my GitHub profile.

    Swift