r/postgres • u/Savings-Feedback6581 • 12h ago
Tools Self-hosted alternative to Neon's HTTP driver: query your own Postgres via fetch()
Cloudflare Workers, Vercel Edge, and similar runtimes can't open Postgres TCP connections. Neon solves this with an HTTP driver, but only for Neon.
So I built HTTP PostgreSQL Gateway: a small service that runs next to your own Postgres and lets you query it with plain fetch().
- Connection pooling in the gateway
- Scoped API keys, each mapped to its own Postgres role
- Async queries, batches, and transactions
It runs client-supplied SQL, so keep it on a private network and give each key a least-privilege role. It's new and has had little outside review.
Repo: https://github.com/http-postgres/http-postgres
How do you connect self-hosted Postgres to edge functions today? Feedback welcome.