I've found that PGlite works fine for simple queries, but fails with the "memory access out of bounds" for more complex queries (when using the browser version).
Uncaught (in promise) RuntimeError: memory access out of bounds
at postgres.wasm:0x59d76
at postgres.wasm:0x725c6
at postgres.wasm:0x46ab2
at postgres.wasm:0x9c8b61
at postgres.wasm:0x9ddb89
at ret.<computed> (postgres.js:9:128289)
at invoke_vii (postgres.js:9:145948)
at postgres.wasm:0x4ff2e8
at postgres.wasm:0x882051
at ret.<computed> (postgres.js:9:128289)
I've found that PGlite works fine for simple queries, but fails with the "memory access out of bounds" for more complex queries (when using the browser version).
For example, this code:
Leads to the following error:
JSFiddle to reproduce the problem: https://jsfiddle.net/zgc5jy7o/