How I Got Postgres into a Single Binary

26 points by rrampage a day ago on lobsters | 4 comments

mxey | a day ago

“ SQLite-style apps that need Postgres features. JSONB, full text search, window functions, extensions like pgvector or PostGIS.”

Doesn’t SQLite have JSONB, FTS and window functions?

cajually | 16 hours ago

SQLite's jsonb can't be compared to PostgreSQL's. Postgres allows inverted indexing, complex operators while SQLite just shaves off some bytes for syntax

meghprkh | 3 hours ago

SQLite's JSONB is also an internal spec, so its not usable with User Defined Function's in the host language, which is what you kinda want to do a lot of times when its SQLite

doctor_eval | 20 hours ago

This is really cool! The original purpose was for running other software that needs Postgres without setting up a whole server environment. It’s just a single binary Postgres that works similarly to the SQLite CLI, for systems that need Postgres:

minipg ./mydb "insert into notes (body) values ('hello')"

You can even tell it to start a tool with the correct environment

minipg run ./mydb -- some-tool