Skip to content

About

SSMS-style PostgreSQL client for Windows. Object Explorer, F5 queries, execution plans, admin and backup. Native C#/WPF, Apache-2.0.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

17 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

PGMS — Postgres Management Studio

English | Português (Brasil)

Build Pre-release License: Apache-2.0

The SQL Server Management Studio experience, for PostgreSQL. A native Windows client with database diagrams, a visual query designer and context-aware IntelliSense, plus Object Explorer, F5 to run, execution plans, session monitoring and backup/restore, built for people who already think in SSMS.

Download v0.1.0-alpha.7 for Windows x64 · Graphical installer (EN/pt-BR) or portable ZIP, .NET runtime included · Works with PostgreSQL 16–18

PGMS editor, Object Explorer and query results

Early pre-release. Querying, browsing and monitoring are the core of this alpha; administration and backup run through reviewable SQL and the official PostgreSQL tools. Full SSMS parity is not claimed. See known limits and release notes.

Contents: Highlights · New in alpha.7 · Why PGMS · Features · Get started · Documentation · Contribute and report problems · License

Highlights

Write SQL with AI

Describe what you need and Query ▸ Generate SQL with AI… (Ctrl+I) writes the SQL for you to review before it reaches the editor. Keep the conversation going with follow-up requests, or select SQL and use Explain, Fix or Optimize SQL with AI from the Query menu. It works with Anthropic, OpenAI or a local Ollama, with your own key. What goes to the provider: your request, the database structure (names, types, keys, comments) and, for Fix, the SQLSTATE and main message of the last error. Table data is never read or sent, nothing is sent until you press Generate, and the SQL is never executed for you. On large databases the provider first picks the relevant tables by name, within a context limit you set. View Sent Context… shows exactly what was sent.

Configure Server TLS

A guided setup that creates or imports a certificate, installs it in the server's data directory, turns on TLS with ALTER SYSTEM, checks a TLS session with that certificate and restores the previous settings if anything fails. Saved profiles for that server then verify the certificate. It requires a superuser connection to a PostgreSQL server running on Windows.

Database diagrams

A database diagram in PGMS with eight tables and their foreign keys

See your schema the way you see it in SSMS. Add tables and their related tables, drag one column onto another to create a foreign key, change columns and primary keys inside the diagram, and let Arrange Tables lay everything out. Every change to the database is shown as a SQL script for review first. Diagrams are saved on the server, in a small pgms schema that PGMS asks permission to create.

Diagrams also show each table's indexes (GIN, GiST, BRIN and operator classes such as gin_trgm_ops, in a section closed by default) and warn about foreign keys that no index serves. Tables, columns and relationships can carry descriptions, stored as PostgreSQL COMMENT ON. Export for AI… writes the diagram as Markdown (columns, keys, relationships, indexes and descriptions) to give an AI agent before it writes SQL; an optional pgms.diagram_markdown(name) function returns the same text inside the database. See Using diagrams with AI agents.

Visual query designer

The Query Designer with the Diagram, Criteria and SQL panes

Build queries by clicking instead of typing. Query ▸ Design Query in Editor (Ctrl+Shift+Q) opens the statement under the cursor in synchronized Diagram, Criteria and SQL panes: tick columns, set filters and sort order, and joins come from your foreign keys. Change the type to Update, Delete, Insert or Make Table. It only writes SQL into your editor and never runs it. UNION and WITH open in the SQL pane only.

IntelliSense that knows where you are

IntelliSense after JOIN suggesting a complete join from a foreign key

Press Ctrl+Space and get what fits that position. After FROM: tables, views and table functions, found by name across all your schemas. After JOIN: the whole join from your foreign keys, such as orders o ON o.customer_id = c.id. After an alias: its columns. Typing ignores accents, so usuar finds Usuários. Parameter Info (Ctrl+Shift+Space) shows the arguments of a function while you type, and Quick Info describes the name under the mouse. CTE columns are not known yet.

Also in PGMS

  • Execution plan advice. Graphical plans flag operators that discard many rows and suggest a missing index as a commented CREATE INDEX script, checked against the catalog and never run for you.
  • Schema Compare. Compare two databases and get a change script in a query tab connected to the target, for you to review and run.
  • Query History. Every query you run, grouped and searchable, stored only on your computer and encrypted for your Windows user.

New in alpha.7

  • AI conversation and Explain / Fix / Optimize SQL with AI.
  • Dark theme, Editor Appearance, Fonts and Colors, and Presenter Mode.
  • Unexpected errors are logged to %LOCALAPPDATA%\PGMS\logs and shown in a window with Report Issue, instead of closing PGMS silently.
  • Editor: Format SQL, Parameter Info and Quick Info, bookmarks, outlining, templates and snippets, Find in Files, spell checking of comments and strings, and the SSMS Edit ▸ Advanced commands.
  • Schema Compare, Live Query Statistics (progress, waits and blockers), Object Explorer Details (F7), the Properties window (F4), Error List and Output.
  • Object Explorer: extensions, maintenance (Vacuum, Analyze, Refresh Materialized View), menus for keys, constraints and triggers, composite types, foreign servers and logical replication.
  • Backup with LZ4/Zstandard, parallel restore and restoring only chosen items; client certificates in Connect.
  • Window layouts, Split Tab, Full Screen, Restore Closed Tab, a menu in the title bar with Search (Ctrl+Q), Keyboard and Query Shortcuts, Import and Export Settings and External Tools.

See the release notes for details and limits.

Why PGMS

  • Feels like SSMS. Object Explorer, query tabs with their own sessions, Results/Messages, F5 and the shortcuts you already use.
  • Review before you apply. Administrative changes are shown as SQL first, so nothing touches the server without you reading it.
  • Know what's running. Session and blocker monitor that distinguishes cancelling a query from terminating a session.
  • Native and fast. C#/WPF on .NET 10, no browser and no JVM.
  • Your drafts survive. Unsaved query tabs are checkpointed and recovered after a crash or forced close, encrypted per Windows user.

Features

  • SQL editor: highlighting, context-aware IntelliSense with Parameter Info and Quick Info, Format SQL, templates and snippets, bookmarks, find/replace and Find in Files, multiple tabs, save/load and encrypted draft recovery.
  • Database diagrams, Table Designer, View Designer and Query Designer.
  • Independent PostgreSQL sessions, execute/cancel, Results/Messages, result grids in pages of 100,000 rows (configurable), results to text or file, copy, Save Grid Results and CSV/JSON export, Query History and Live Query Statistics.
  • Object Explorer and Object Explorer Details, the Properties window, Script as, extensions and maintenance, graphical execution plans (estimated and actual), Schema Compare and session configuration.
  • Reviewed SQL administration for supported databases, schemas, tables, columns, identity, indexes, constraints, sequences, roles and privileges.
  • Session/blocker monitoring, with distinct query cancellation and session termination.
  • Logical backup/restore through external PostgreSQL tools: custom, tar, SQL and directory formats, gzip/LZ4/Zstandard, parallel and partial restore, plus reviewed global operations.
  • Light, dark or system theme, Fonts and Colors, keyboard shortcuts and window layouts.

Get started

Install

Download the installer or the ZIP from the latest release, run it, then use Connect and New Query. Backup/restore needs the PostgreSQL client tools (pg_dump, pg_restore, psql) of the same major version as the server. Details: setup guide.

Windows SmartScreen warning

PGMS releases are not code-signed yet, so Windows may show "Windows protected your PC" the first time you run the installer or PGMS.exe. Choose More info and then Run anyway. Before doing so, confirm the download matches the checksums published with the release:

Get-FileHash .\PGMS-* -Algorithm SHA256

Compare the hashes with SHA256SUMS.txt in the release. Starting with v0.1.0-alpha.2 the assets are built by the release workflow on GitHub Actions and carry a build provenance attestation, so you can also confirm that the ZIP or installer came from that workflow and this repository (requires the GitHub CLI):

gh attestation verify .\PGMS-0.1.0-alpha.7-Setup-x64.exe --repo leoars/PostgresManagementStudio

v0.1.0-alpha.1 was built on the maintainer's machine and has checksums only. Code signing through the SignPath Foundation open source program is planned.

Build from source

For development: Windows x64, PowerShell 7 and the .NET SDK selected by global.json (10.0.400, latest installed patch in that feature band). PostgreSQL 16–18 and matching-major tools are needed for database tests and backup/restore.

git clone https://github.com/leoars/PostgresManagementStudio.git
cd PostgresManagementStudio
./scripts/Build.ps1
dotnet run --project src/PGMS.Desktop

The self-contained portable package includes .NET/WPF, but no PostgreSQL server or tools. Local candidate ZIPs and acceptance artifacts are absent from a fresh clone. See setup and packaging.

Documentation

Topic English Português (Brasil)
Setup and packaging Guide Guia
Queries, administration, backup User guide Guia de uso
Build, tests, contributions Development Desenvolvimento
Structure Architecture Arquitetura
Evidence and limits Validation Validação
Attribution Licensing Licenças

Documentation index. Public guides are maintained in both languages; the original internal development history is not included in this curated source repository. Bilingual documentation does not localize the application UI.

Contribute and report problems

If PGMS hits an error. An unexpected error opens a window with the details; PGMS also writes them to a daily log in %LOCALAPPDATA%\PGMS\logs (kept 30 days, nothing sent over the network). Choose Report Issue, describe what you were doing and attach the log or the text from Copy Details after reading it: an error message can quote what the server sent. You can usually choose Continue; your open queries keep their text.

See CONTRIBUTING.md and the code of conduct. English and Brazilian Portuguese are welcome. Issue templates guide bug reports and feature requests; usage questions go to Discussions. Use synthetic data and remove credentials and personal information from reports. For vulnerabilities, follow SECURITY.md.

License

PGMS is created and maintained by Leonardo Santos. Its original code and documentation use Apache-2.0: free for personal and business use, keeping the copyright and the credits in NOTICE. Releases through 0.1.0-alpha.4 remain under MIT. Third-party components and the PostgreSQL elephant retain their own licenses and trademark terms; see third-party notices. PGMS is independent, without endorsement by Microsoft or the PostgreSQL project. SSMS is a reference, not a distributed dependency.

About

SSMS-style PostgreSQL client for Windows. Object Explorer, F5 queries, execution plans, admin and backup. Native C#/WPF, Apache-2.0.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages