3 ms·
It's possible to have Postgres serve HTTP, actually. I've seen many experiments like this. I don't remember the name, but... actually... Yeah, thanks ChatGPT -
by scrollaway 4y ago
It's possible to have Postgres serve HTTP, actually. I've seen many experiments like this. I don't remember the name, but... actually... Yeah, thanks ChatGPT - It's called PostgREST: https://postgrest.org/en/stable/ https://postgrest.org/en/stable/
I've obviously not used it and to be honest, I probably wouldn't. But IMO Postgres is a radically different type of framework. People just think of it as a SQL database, it can be much more though. Tooling is just a bit lacking.
Edit: Heh, Retool is sponsoring them. "PostgREST for the backend, Retool for the frontend". Cool idea. I might reconsider...
- fnimick 4y agoYou can go even farther and generate an entire GraphQL api with row level security, custom functions, etc. I've had a great experience developing with Postgraphile - https://www.graphile.org/postgraphile/ https://www.graphile.org/postgraphile/
- xrayarx 4y agoLooks and sounds great, but nodejs
- dragonwriter 4y agoPostgREST is an external web server; postgres isn’t serving HTTP, though its effectively doing everything else that the backend requires besides serving HTTP when you use PostgREST.
- scrollaway 4y agoYes, postgrest isn't the one I was actually remembering that DID serve HTTP itself. I know there was an extension that did this though. It doesn't matter anyway. Serving HTTP is not a problem particularly well solved by Postgres, and needing an extension instead of whatever hyper-optimized http server you usually use is increasing complexity, not decreasing it.
- qup 4y ago> thanks ChatGPT I find the thing quicker than asking google, pretty often. I really want a CLI interface to have an "ask the oracle" kind of feature.
- scrollaway 4y agoIn this particular case, it would actually have been slower. I can't phrase things on Google like I do on the chat; I first have to distill my query down. And when I actually am trying to remember something, it's easier for me to be descriptive, because the keywords Google needs can be the important ones I forgot. PostgREST is page two of "postgres http server" for me.