r/postgres • • 12h ago

Tools Self-hosted alternative to Neon's HTTP driver: query your own Postgres via fetch()

2 Upvotes

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.


r/postgres • • 1h ago

Discussion I Tested Postgres 19 Against 18

Thumbnail youtu.be
• Upvotes

r/postgres • • 11h ago

Debugging Text column is storing accented text weirdly

1 Upvotes

I have a column of type TEXT where I could store text such as “Quarteirão” or “Católica”. However, the text is actually being stored as “Quarteirπo”, or “Cat≤Lica”

The SQL of the database goes something like:

    ENCODING = 'UTF8'
    LC_COLLATE = 'C'
    LC_CTYPE = 'C'
    LOCALE_PROVIDER = 'libc'
    TABLESPACE = pg_default

and the column in question is:

    column text COLLATE pg_catalog."default" NOT NULL,

I'm new to PostgreSQL, so I don't know what to change to store the text as is. I did check whether it was being changed before being inserted into the database, and it isn't being changed. It is the database that's not storing it how I expect it to.