(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=41224689

介绍 pglite:PostgreSQL 的轻量级 WASM (WebAssembly) 版本,旨在跨浏览器、Node.js 和 Bun 等各种平台无缝运行,无需额外设置或依赖安装。 pglite 包压缩后大小仅为 3MB,支持多种流行的 PostgreSQL 扩展(如 pgVector),并提供响应式实时查询界面。 其性能令人印象深刻,CRUD 操作在不到 0.3 毫秒内完成,而大型多行选择查询则在眨眼间执行,仅消耗一帧的时间。 最初由 ElectricSQL 团队作为实验开发,其广泛的好评促进了实际应用的进一步开发。 他们与 Supabase 团队合作,成功创建了“Postgres New”,这是一个基于 pglite 构建的新 PostgreSQL 开发平台。 对于那些有兴趣尝试 pglite 的人,资源包括其官方网站 ([https://pglite.dev](https://pglite.dev))、文档页面 ([https://pglite.dev/docs](https://pglite.dev)) ://pglite.dev/docs))、扩展列表([https://pglite.dev/extensions](https://pglite.dev/extensions))、早期基准测试结果([https://pglite.dev /benchmarks](https://pglite.dev/benchmarks)),以及允许用户测试的交互式在线 REPL ([https://pglite.dev/repl](https://pglite.dev/repl)) 直接在他们的网络浏览器中。

相关文章

原文
Hey, Sam and the team from ElectricSQL here.

PGlite is a WASM Postgres build packaged into a TypeScript/JavaScript client library, that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It's 3mb Gzipped, now has support for many Postgres extensions, including pgvector, and it has a reactive "live query" API. It's also fast, with CRUD style queries executing in under 0.3 ms, and larger, multi-row select queries occurring within a fraction of a single frame.

PGlite started as an experimental project we shared on X, and the response to it was incredible, encouraging us to see how far we could take it. Since then we have been working to get it to a point where people can use it to build real things. We are incredibly excited as today, with the release of v0.2, the Supabase team has released the amazing http://postgres.new site built on top of it. Working with them to deliver both PGlite and postgres.new has been a joy.

- https://pglite.dev - PGlite website

- https://github.com/electric-sql/pglite - GitHub repo

- https://pglite.dev/docs - Docs on how to use PGlite

- https://pglite.dev/extensions - Extensions catalog

- https://pglite.dev/benchmarks - Early micro-benchmarks

- https://pglite.dev/repl - An online REPL so that you can try it in the browser

We would love you to try it out, and we will be around to answer any questions.

联系我们 contact @ memedata.com