Hello, can you please summarize the advantages of PGLite compared to SQLite? I've never used Postgres before, my work is mostly on the embedded domain using files and a lot of browser execution on the client side. With SQLite there is simplicity attached to the databases, with PGLite I see a lot of interesting extensions to try out but what would the big difference when compared to SQLite?
PGlite – Embeddable Postgres
91–100 of 118 posts
Re: PGlite – Embeddable Postgres
#92Hello, can you please summarize the advantages of PGLite compared to SQLite? I've never used Postgres before, my work is mostly on the embedded domain using files and a lot of browser execution on the client side. With SQLite there is simplicity attached to the databases, with PGLite I see a lot of interesting extensions to try out but what would the big difference when compared to SQLite?
The main use case, in my opinion, is for tests/CI. SQLite has traditionally been used to quickly run tests, however, if your actual infra uses PostgreSQL then the value is limited.
Re: PGlite – Embeddable Postgres
#93Earlier quoted context omitted.
The main use case, in my opinion, is for tests/CI. SQLite has traditionally been used to quickly run tests, however, if your actual infra uses PostgreSQL then the value is limited.
You think the main use for sqlite is running tests?
Re: PGlite – Embeddable Postgres
#94Earlier quoted context omitted.
The main use case, in my opinion, is for tests/CI. SQLite has traditionally been used to quickly run tests, however, if your actual infra uses PostgreSQL then the value is limited.
You think the main use for sqlite is running tests?
Not that testing is the main use of sqlite.
Re: PGlite – Embeddable Postgres
#95Earlier quoted context omitted.
If I understand correctly, what this project does is take the actual postgresql sources, which are written in C, compile them to wasm and provide typescript wrappers. So you need the wasm to be able to use the C code from js/ts.
Yes. I would like to use the code as a library from something other than js/ts.
Re: PGlite – Embeddable Postgres
#96What is the advantage of using something like this instead of the IndexedDB Browser Feature
I was shocked to discover how incredibly poorly IndexedDB works. I always thought it would be fast and snappy if a bit alien. But nope, it's incredibly bad! Despite being a native feature to the browser it's incredibly slow, and the way it works in terms of fetching records based on non-primary keys forces you to either load your entire dataset into RAM at once or iterate though it record-by-record in a slow callback…
Re: PGlite – Embeddable Postgres
#97Earlier quoted context omitted.
If I understand correctly, what this project does is take the actual postgresql sources, which are written in C, compile them to wasm and provide typescript wrappers. So you need the wasm to be able to use the C code from js/ts.
Yes. I would like to use the code as a library from something other than js/ts.
Re: PGlite – Embeddable Postgres
#98What is the advantage of using something like this instead of the IndexedDB Browser Feature
Re: PGlite – Embeddable Postgres
#99Hey everyone, I work on PGlite. Excited to see this on HN again. If you have any questions I'll be sure to answer them. We recently crossed a massive usage milestone with over 3M weekly downloads (we're nearly at 4M!) - see https://www.npmjs.com/package/@electric-sql/pglite While we originally built this for embedding into web apps, we have seen enormous growth in devtools and developer environments - both Google Fir…
Well downloads doesn’t equal usage does it ? How do you know how many deployments you actually have in the wild?
Additionally, how you can get data on how many deployments without telemetry? The only telemetry that I’m interested in is for my uses, and don’t really care about sending data on deployment count to a third party. So the download count becomes a “good enough” metric.
Re: PGlite – Embeddable Postgres
#100I'd love to to use PGLite in a non-JavaScript runtime. For example, embed PGLite into my Go CLI with a WASM runtime and use PGLite as a replacement for SQLite. https://github.com/electric-sql/pglite/issues/89 makes it sound like there's "third-party" bindings for Rust. Is there any interest in "official" PGLite bindings to other languages?
yep PGLite + Go would be great!