Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

PGLite is amazing for integration testing of queries against a real in-memory db.

Is it possible to use PGLite for that purpose in non-JS environments, like e.g. golang?



You can use pg-gateway from supabase (https://github.com/supabase-community/pg-gateway) to start a PGlite and connect form any standard PG client.

Support for other languages is high on my list, the plan is to build a "libpglite" as a native C lib and a WASI build that can run in any WASM runtime.


Thanks!

From my perspective, being able to pull pglite into the same golang process is preferable - faster, less IPC complexity, no risk of leaving lingering state.

Making postgres an in-process dependency is much of the appeal of pglite for me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: