pgx
PGX — Lightweight Postgres for AI agents. Written in Rust. Thousands of isolated databases in one runtime. 🐘
翻譯準備中
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證A desktop PostgreSQL client: browse schemas, edit rows inside transactions, run SQL and read query plans.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
An open-source, cross-platform PostgreSQL client built with Tauri (Rust) and React: a dense, IDE-style desktop app for browsing schemas, editing rows inside transactions, running SQL and reading query plans.
Status: early release. The core is in place and in daily use; expect rough edges. See PRODUCT.md for the scope and the roadmap.檢視完整 README ↗An open-source, cross-platform PostgreSQL client built with Tauri (Rust) and React: a dense, IDE-style desktop app for browsing schemas, editing rows inside transactions, running SQL and reading query plans.
Website: https://pgstudio.nilpointer.tech
Status: early release. The core is in place and in daily use; expect rough edges. See PRODUCT.md for the scope and the roadmap.
postgres:// URI or host/port), TLS (sslmode up to verify-full, custom CA, client certificate), SSH tunnels (password or key, host keys pinned on first use), read-only connections, a pooler mode for PgBouncer/Supabase in transaction mode, folders and an identity color per connection. Export the ones you pick (a whole folder from its menu), folders included; import a Postgres Studio export or pgAdmin's servers.json into the folder you choose, its groups as subfolders.psql instead, per console or by default (Settings › Console), for its meta-commands (\d, \copy, \i, \gexec, \set, \if) and your ~/.psqlrc. Postgres Studio uses the psql it finds on your PATH, in Homebrew's libpq, Postgres.app or PostgreSQL's install folders, or one you pick; it doesn't download one. The connection's password reaches psql through its environment, never its command line. Result sets land in the same grid, psql's output streams into Messages, and Cancel or a time limit stops the run.COPY ... FROM stdin blocks included), stop or continue on errors, with progress and the failing lines.EXPLAIN and EXPLAIN (ANALYZE, BUFFERS) (rolled back) as a tree with time per node and estimated against actual rows.pg_dump (custom, directory, tar, plain) and pg_restore / psql, with the client tools already on the machine.cypher() calls highlighted and completed for Apache AGE, vertices and edges shown readably; pgvector values shown compactly, with the distance operators and index opclasses in completion.http://127.0.0.1:47432/mcp (the port is yours to change; a port in use is reported, never swapped), with a bearer token kept in the keychain. Off by default and only while the app runs. Each capability - browsing (always on), reading, writing rows, schema changes, any SQL, seeing, editing and deleting connections, saving scripts - is Off, Ask (an approval card in the app with the SQL and, for writes, a dry run that counts the rows it changes and is rolled back) or Allow; each connection is None, Read or Read & write. Reads run in a read-only transaction. "Add to <client>" writes the server's entry, token included, into that client's own config file (~/.claude.json through claude mcp add, ~/.cursor/mcp.json, ~/.codex/config.toml, VS Code's user mcp.json), keeping the rest of the file and a .bak copy. Passwords and full connection strings never reach a client.Postgres Studio keeps a log file, so a failed connection or a crash can be looked into after the fact. To find it, open the command palette (Ctrl/Cmd+K) and choose Open logs folder. The crash screen has the same button. The file is postgres-studio.log in:
| OS | Folder |
|---|---|
| Windows | %LOCALAPPDATA%\com.edneymesquita.postgres-studio\logs |
| macOS | ~/Library/Logs/com.edneymesquita.postgres-studio |
| Linux | $XDG_DATA_HOME/com.edneymesquita.postgres-studio/logs, usually ~/.local/share/com.edneymesquita.postgres-studio/logs |
When the file reaches 5 MB it is renamed with a timestamp and a new one is started. The five most recent old files are kept.
What's never logged: passwords, passphrases or other secrets; connection strings (only the hosts, with no user or options); SQL text or row values. When a query fails, only the kind of error and the server's SQLSTATE are written, because the server's message can quote your data.
Prerequisites:
rustup)npm install
npm run tauri dev
A local server with sample data (a shop database with foreign keys, an enum, jsonb and citext columns):
docker compose -f docker-compose.dev.yml up -d
Backend tests:
cd src-tauri
cargo test
Integration tests that talk to a real PostgreSQL are marked #[ignore]. With the dev server up, run them explicitly:
export POSTGRES_STUDIO_TEST_URI="postgres://postgres:postgres@localhost:5433/shop"
cargo test --lib -- --ignored
The TimescaleDB support has its own server in the same compose file (docker compose -f docker-compose.dev.yml up -d timescale, port 5436, database tsdb). Its live tests share that seed, so they run one at a time:
export POSTGRES_STUDIO_TIMESCALE_URI="postgres://postgres:postgres@localhost:5436/tsdb"
cargo test --lib -- --ignored --test-threads=1 timescale
scripts/bench.mjs times the backend's commands through the dev bridge (the same commands and JSON as the app's IPC), so an optimization can be measured before and after. It needs a bench database with a large table on the dev server:
docker exec postgres-studio-dev psql -U postgres -c "create database bench"
docker exec postgres-studio-dev psql -U postgres -d bench -c "create table big as select g as id, md5(g::text) as hash, (random()*1e6)::int as qty, now() - (g || ' seconds')::interval as created_at, jsonb_build_object('k', g) as meta, (g % 7 = 0) as flag, repeat('x', 40) as filler, gen_random_uuid() as uid, (random()*1000)::numeric(12,2) as price, null::text as empty from generate_series(1, 1000000) g; alter table big add primary key (id); analyze big;"
(cd src-tauri && cargo build --release --features devbridge --bin devbridge) && src-tauri/target/release/devbridge &
node scripts/bench.mjs <connection id> --runs 5
Startup is marked in the page as performance.mark("app-mounted") (the first React commit), next to the navigation timings.
npm run tauri build
Produces a platform-native installer (.dmg/.app on macOS, .msi/.exe on Windows, .deb/.rpm/.AppImage on Linux) under src-tauri/target/release/bundle/.
The source design is src-tauri/icons/icon-source.svg. After editing it, regenerate every platform variant with:
npx tauri icon src-tauri/icons/icon-source.svg
Pushing a tag matching vX.Y.Z triggers .github/workflows/release.yml, which builds installers for macOS (universal binary), Windows, and Linux and attaches them to a draft GitHub release for review before publishing. Builds are unsigned, so first launches will trip Gatekeeper (macOS) or SmartScreen (Windows) warnings until code signing is set up separately.
The Microsoft Store package (MSIX) is built by .github/workflows/microsoft-store.yml; see docs/microsoft-store.md.
MIT - see LICENSE.
PostgreSQL is a trademark of the PostgreSQL Community Association; Postgres Studio is an independent project, not affiliated with or endorsed by it.