Getting started

Download or build, set up, connect, run a statement.

1. Download a release

Prebuilt binaries on the Releases page, with a SHA256SUMS file: Windows x64, Linux x64 / ARM64 (static musl, no glibc dependency), macOS Apple Silicon / Intel. A single file, no installer, no libpq: unpack and run pgtc.

The binaries are not signed. Windows SmartScreen asks once (More info → Run anyway); on macOS remove the quarantine flag first: xattr -d com.apple.quarantine pgtc.

For a remote server, run pgtc on that server over SSH: it connects locally and only the terminal output crosses the network.

2. Or build from source

Needs Rust (the toolchain is pinned in rust-toolchain.toml); no C compiler, no libpq.

git clone https://github.com/pokrad/pgtc.git
cd pgtc
cargo build --release          # target/release/pgtc, a single file
cargo install --path crates/pgtc   # or: into ~/.cargo/bin

3. Setup

pgtc --setup

Copies the built-in developer templates into your user folder (also Settings → Run setup). Only F7 needs it.

4. Save a connection

File → New connection… (F9 opens the menu), then Connect from F2 on the server row.

The New connection dialog
New connection.

Details: Connections.

Or from the command line

pgtc -h localhost -U postgres adventureworks

psql's connection options. The connection is saved (unless an identical one exists) and connected at once; see Command line.

5. Browse

6. Run a query

A query tab after F5
Only the selected statement was executed.

7. Close and quit

Ctrl+W closes the tab, F10 quits. Both ask about unsaved text and open transactions.

Next

The window, menus and keysLayout and navigation. Query tabsResult sets, messages, cancel, transactions. psql-style commandsList, describe and generate commands. TroubleshootingKeys the terminal does not pass.

No F-keys (some SSH clients, macOS): Esc then a digit — Esc 5 is F5, Esc 0 is F10.