Add PGlite version to a VFS file and report with select version()
#369
Labels
enhancement
New feature or request
select version()
#369
There are a few things that would be useful here:
SELECT VERSION()
Postgres has it's version compiled into it via a
PG_VERSION
env var, which is used to constructPG_VERSION_STR
here:https://github.com/postgres/postgres/blob/53b2c921a0f9b56465ab65165c1909f9616ffa98/configure#L19226
Both are added to
confdefs.h
before compiling.PGlite has a split compilation process, the WASM is built first, then the JS/TS wrapper and packaging. Our CI caches the WASM for faster builds. Ideally we use the existing changesets tooling to bump a version file somewhere that will trigger the rebuild of the WASM, and we patch the build config to something like:
so that the resulting string is something like:
We should then modify our initdb to add the
PGLITE_VERSION' file - it should probably be the full output of
SELECT VERSION()but maybe prefixed with
Created by: ` to make it apparent its the version stat created the database.I would prefer all this to be baked into the WASM (or native build with libpglite) rather than in the JS/TS code.
The text was updated successfully, but these errors were encountered: