pglite 0.4.5
Repro, this test fails, PGLite returns instead: [ 'NULL', 'hello', 'NULL' ] which is it doesn't handle nulls.
import { PGlite } from "@electric-sql/pglite";
import { describe, expect, it } from "vitest";
describe("pglite array NULL reproduction", () => {
it("text[] with NULL elements returns null, not string 'NULL'", async () => {
const pg = new PGlite();
await pg.waitReady;
await pg.exec("CREATE TEMP TABLE t (val text[])");
await pg.query("INSERT INTO t (val) VALUES ($1)", [[null, "hello", null]]);
const res = await pg.query("SELECT val FROM t");
expect(res.rows[0].val).toEqual([null, "hello", null]);
});
});
pglite 0.4.5
Repro, this test fails, PGLite returns instead:
[ 'NULL', 'hello', 'NULL' ]which is it doesn't handle nulls.