pglite
pglite copied to clipboard
Better error message when using extensions without a `dataDir`
Currently, if you try and use an extension without specifying a dataDir
import { citext } from '@electric-sql/pglite/contrib/citext';
const db = new PGlite(undefined, {
extensions: { citext }
});
It will not cause any issue, but when you run
CREATE EXTENSION IF NOT EXISTS citext;
It will fail with error: extension "citext" is not available
It would be better if pglite instead fast-failed when specifying an extension without a dataDir telling you that you need a dataDir to use extensions (even if it's just memory://)